From b0c56d16dbe7de30a16a0715148ecfe739c665da Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 15 Mar 2025 15:50:27 +0200 Subject: stellar freighter api update --- .../@shared/constants/soroban/token.d.ts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/external/stellar-freighter-api/@shared/constants/soroban/token.d.ts (limited to 'src/external/stellar-freighter-api/@shared/constants/soroban/token.d.ts') diff --git a/src/external/stellar-freighter-api/@shared/constants/soroban/token.d.ts b/src/external/stellar-freighter-api/@shared/constants/soroban/token.d.ts new file mode 100644 index 0000000..9c5ee8b --- /dev/null +++ b/src/external/stellar-freighter-api/@shared/constants/soroban/token.d.ts @@ -0,0 +1,31 @@ +import { NETWORKS } from "@shared/constants/stellar"; +export declare enum SorobanTokenInterface { + transfer = "transfer", + mint = "mint" +} +export type ArgsForTokenInvocation = { + from: string; + to: string; + amount: bigint | number; +}; +export type TokenInvocationArgs = ArgsForTokenInvocation & { + fnName: SorobanTokenInterface; + contractId: string; +}; +export interface SorobanToken { + transfer: (from: string, to: string, amount: number) => void; + mint: (to: string, amount: number) => void; + name: string; + balance: number; + symbol: string; + decimals: number; +} +export type AssetsListKey = NETWORKS.PUBLIC | NETWORKS.TESTNET; +export type AssetsLists = { + [K in AssetsListKey]: AssetsListItem[]; +}; +export interface AssetsListItem { + url: string; + isEnabled: boolean; +} +export declare const DEFAULT_ASSETS_LISTS: AssetsLists; -- cgit v1.2.3