UNPKG

@ledgerhq/coin-canton

Version:
64 lines 5.21 kB
import type { CryptoCurrency } from "@ledgerhq/ledger-wallet-framework/types"; import type { GetTransferPreApprovalResponse, OnboardingPrepareResponse, OnboardingSubmitResponse, OperationView, Party, PrepareTapResponse, PrepareTransferInstructionRequest, PrepareTransferRequest, PrepareTransferResponse, SubmitTapRequestRequest, SubmitTapRequestResponse, SubmitTransactionResponse, TapRequest, TransferProposal } from "../types/gateway"; import { PrepareTransactionResponse } from "../types/onboard"; import type { CantonSignature } from "../types/signer"; export declare const SEPARATOR = "____"; export declare const DEFAULT_TAP_REQUEST_AMOUNT = "100000000000000000000000000000000000000"; export declare const getKey: (id: string, adminId: string) => string; export declare const getNetworkType: (currency: CryptoCurrency) => "devnet" | "localnet" | "mainnet" | "testnet"; export declare function isGatewayEnabled(currency: CryptoCurrency): boolean; export declare const isPartyNotFound: (error: unknown) => boolean; export declare const isPartyAlreadyExists: (error: unknown) => boolean; export declare function getPartyById(currency: CryptoCurrency, partyId: string): Promise<Party>; export declare function getPartyByPubKey(currency: CryptoCurrency, pubKey: string): Promise<Party>; export declare function prepareOnboarding(currency: CryptoCurrency, pubKey: string): Promise<OnboardingPrepareResponse>; export declare function isTopologyChangeRequired(currency: CryptoCurrency, pubKey: string): Promise<boolean>; export declare const isTopologyChangeRequiredCached: import("@ledgerhq/live-network/cache").CacheRes<[currency: CryptoCurrency, pubKey: string], boolean>; export declare function clearIsTopologyChangeRequiredCache(currency: CryptoCurrency, pubKey: string): void; export type InstrumentInfo = { id: string; admin: string; }; export type InstrumentsResponse = InstrumentInfo[]; export declare function getEnabledInstruments(currency: CryptoCurrency): Promise<Set<string>>; export declare const getEnabledInstrumentsCached: import("@ledgerhq/live-network/cache").CacheRes<[currency: CryptoCurrency], Set<string>>; export declare function clearEnabledInstrumentsCache(currency: CryptoCurrency): void; export declare function submitOnboarding(currency: CryptoCurrency, publicKey: string, prepareResponse: OnboardingPrepareResponse, { signature, applicationSignature }: CantonSignature): Promise<OnboardingSubmitResponse>; export declare function getBalance(currency: CryptoCurrency, partyId: string): Promise<import("..").InstrumentBalance[]>; export declare function getOperations(currency: CryptoCurrency, partyId: string, options?: { cursor?: number | undefined; minOffset?: number | undefined; maxOffset?: number | undefined; limit?: number | undefined; }): Promise<{ next: number; operations: OperationView[]; }>; export declare function getPendingTransferProposals(currency: CryptoCurrency, partyId: string): Promise<TransferProposal[]>; export declare function getTransferPreApproval(currency: CryptoCurrency, partyId: string): Promise<GetTransferPreApprovalResponse>; export declare function getLedgerEnd(currency: CryptoCurrency): Promise<number>; export declare function prepare(currency: CryptoCurrency, partyId: string, params: PrepareTransferRequest | PrepareTransferInstructionRequest): Promise<PrepareTransferResponse>; export declare function prepareTransferRequest(currency: CryptoCurrency, partyId: string, params: PrepareTransferRequest): Promise<PrepareTransferResponse>; export declare function prepareTransferInstruction(currency: CryptoCurrency, partyId: string, params: PrepareTransferInstructionRequest): Promise<PrepareTransferResponse>; export declare function preparePreApprovalTransaction(currency: CryptoCurrency, partyId: string): Promise<PrepareTransactionResponse>; export declare function prepareTapRequest(currency: CryptoCurrency, { partyId, amount }: TapRequest): Promise<PrepareTapResponse>; export declare function submit(currency: CryptoCurrency, partyId: string, serialized: string, signature: string): Promise<SubmitTransactionResponse>; export declare function submitTransferInstruction(currency: CryptoCurrency, partyId: string, serialized: string, signature: string): Promise<SubmitTransactionResponse>; export declare function submitPreApprovalTransaction(currency: CryptoCurrency, partyId: string, { serialized }: PrepareTransactionResponse, signature: string): Promise<{ isApproved: true; submissionId: string; updateId: string; }>; export declare function submitTapRequest(currency: CryptoCurrency, { partyId, serialized, signature }: SubmitTapRequestRequest): Promise<SubmitTapRequestResponse>; export type CalToken = { id: string; name: string; ticker: string; network: string; contract_address: string; token_identifier: string; }; export declare const getCalTokensCached: import("@ledgerhq/live-network/cache").CacheRes<[currency: CryptoCurrency], Map<string, string>>; export type { TransferProposal, OnboardingPrepareResponse, PrepareTransferResponse, OperationView, } from "../types/gateway"; export type OperationInfo = OperationView; //# sourceMappingURL=gateway.d.ts.map