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/api/external.d.ts | 73 +++++++++++++++++----- 1 file changed, 56 insertions(+), 17 deletions(-) (limited to 'src/external/stellar-freighter-api/@shared/api/external.d.ts') diff --git a/src/external/stellar-freighter-api/@shared/api/external.d.ts b/src/external/stellar-freighter-api/@shared/api/external.d.ts index 9755ca4..8505603 100644 --- a/src/external/stellar-freighter-api/@shared/api/external.d.ts +++ b/src/external/stellar-freighter-api/@shared/api/external.d.ts @@ -1,24 +1,63 @@ -import { UserInfo } from "./types"; -export declare const requestPublicKey: () => Promise; +import { FreighterApiError } from "./types"; +export declare const requestAccess: () => Promise<{ + publicKey: string; + error?: FreighterApiError; +}>; +export declare const requestPublicKey: () => Promise<{ + publicKey: string; + error?: FreighterApiError; +}>; +export declare const submitToken: (args: { + contractId: string; + networkPassphrase?: string; +}) => Promise<{ + contractId?: string; + error?: FreighterApiError; +}>; export declare const submitTransaction: (transactionXdr: string, opts?: string | { - network?: string | undefined; - accountToSign?: string | undefined; - networkPassphrase?: string | undefined; -} | undefined, accountToSign?: string | undefined) => Promise; -export declare const submitBlob: (blob: string, opts?: { - accountToSign?: string | undefined; -} | undefined) => Promise; + accountToSign?: string; + networkPassphrase?: string; +}, accountToSign?: string) => Promise<{ + signedTransaction: string; + signerAddress: string; + error?: FreighterApiError; +}>; +export declare const submitMessage: (blob: string, version: string, opts?: { + address?: string; + networkPassphrase?: string; +}) => Promise<{ + signedMessage: Buffer | null; + signerAddress: string; + error?: FreighterApiError; +}>; export declare const submitAuthEntry: (entryXdr: string, opts?: { - accountToSign?: string | undefined; -} | undefined) => Promise; -export declare const requestNetwork: () => Promise; + address?: string; + networkPassphrase?: string; +}) => Promise<{ + signedAuthEntry: Buffer | null; + signerAddress: string; + error?: FreighterApiError; +}>; +export declare const requestNetwork: () => Promise<{ + network: string; + networkPassphrase: string; + error?: FreighterApiError; +}>; export declare const requestNetworkDetails: () => Promise<{ network: string; networkUrl: string; networkPassphrase: string; - sorobanRpcUrl?: string | undefined; + sorobanRpcUrl?: string; + error?: FreighterApiError; +}>; +export declare const requestConnectionStatus: () => Promise<{ + isConnected: boolean; +}>; +export declare const requestAllowedStatus: () => Promise<{ + isAllowed: boolean; + error?: FreighterApiError; +}>; +export declare const setAllowedStatus: () => Promise<{ + isAllowed: boolean; + error?: FreighterApiError; }>; -export declare const requestConnectionStatus: () => Promise; -export declare const requestAllowedStatus: () => Promise; -export declare const setAllowedStatus: () => Promise; -export declare const requestUserInfo: () => Promise; -- cgit v1.2.3