2024-06-24 14:20:27 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2024 Fluence DAO
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, version 3.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2023-09-27 14:07:22 +02:00
|
|
|
import {
|
|
|
|
callConstant,
|
|
|
|
registerGetter,
|
|
|
|
timestampAndTtl,
|
|
|
|
} from "../compiled/examples/constants.js";
|
2023-06-19 19:28:34 +03:00
|
|
|
|
|
|
|
export async function constantsCall(): Promise<string[]> {
|
2023-09-27 14:07:22 +02:00
|
|
|
registerGetter({
|
|
|
|
createStr: (arg0) => {
|
|
|
|
return "" + arg0;
|
|
|
|
},
|
|
|
|
});
|
2023-06-19 19:28:34 +03:00
|
|
|
|
2023-09-27 14:07:22 +02:00
|
|
|
return await callConstant();
|
2023-06-19 19:28:34 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 14:07:22 +02:00
|
|
|
export async function particleTtlAndTimestampCall(
|
|
|
|
ttl: number,
|
|
|
|
): Promise<[number, number]> {
|
|
|
|
return await timestampAndTtl({ ttl: ttl });
|
2023-06-19 19:28:34 +03:00
|
|
|
}
|