@zebec-fintech/silver-card-sdk
Version:
An sdk for purchasing silver card in zebec
65 lines (64 loc) • 3.05 kB
TypeScript
import { SupportedChain } from "./chains";
export declare class OrderCardRequest {
readonly amount: Money;
readonly recipient: Recipient;
readonly receipt: Receipt;
constructor(amount: Money, recipient: Recipient, receipt: Receipt);
}
export declare class Quote {
id: string;
token: string;
targetCurrency: string;
amountRequested: number;
pricePerUnitCurrency: number;
totalPrice: number;
platformFee: number;
expiresIn: number;
timestamp: Date;
status: "pending" | "expired" | "accepted" | "rejected";
constructor(id: string, token: string, targetCurrency: string, amountRequested: number, pricePerUnitCurrency: number, totalPrice: number, platformFee: number, expiresIn: number, timestamp: Date, status: "pending" | "expired" | "accepted" | "rejected");
}
export declare class Deposit {
tokenName: string;
tokenAmount: number;
signature: string;
buyerAddress: string;
txHash?: string;
blockHash?: string;
chainId?: SupportedChain;
purchaseCounter?: number;
constructor(tokenName: string, tokenAmount: number, signature: string, buyerAddress: string, txHash?: string, blockHash?: string, chainId?: SupportedChain, purchaseCounter?: number);
}
export declare class Receipt {
quote?: Quote;
deposit?: Deposit;
constructor(quote?: Quote, deposit?: Deposit);
}
export declare class Money {
readonly amount: number;
readonly currencyCode: string;
private constructor();
static create(amount: number | string, currencyCode: string): Money;
static USD(amount: number | string): Money;
}
export declare class Recipient {
readonly participantId: string;
readonly firstName: string;
readonly lastName: string;
readonly emailAddress: string;
readonly address1: string;
readonly address2?: string;
readonly city: string;
readonly state: string;
readonly postalCode: string;
readonly countryCode: CountryCode;
readonly language: string;
readonly mobilePhone: string;
private constructor();
static create(participantId: string, firstName: string, lastName: string, emailAddress: string, mobilePhone: string, language: string, city: string, state: string, postalCode: string, countryCode: CountryCode, address1: string, address2?: string): Recipient;
}
export declare const allCountriesWithCode: {
name: string;
code: string;
}[];
export type CountryCode = "DZA" | "AGO" | "ARG" | "AUS" | "AUT" | "BEL" | "BOL" | "BRA" | "CMR" | "CAN" | "CHL" | "CRI" | "CYP" | "CZE" | "DNK" | "ECU" | "EGY" | "SLV" | "EST" | "FIN" | "FRA" | "GEO" | "DEU" | "GHA" | "GRC" | "GTM" | "HND" | "HUN" | "ISL" | "IRL" | "ITA" | "JAM" | "JPN" | "JOR" | "KEN" | "KOR" | "KWT" | "LTU" | "LUX" | "MWI" | "MYS" | "MLT" | "MEX" | "MAR" | "MOZ" | "NPL" | "NLD" | "NZL" | "NGA" | "NOR" | "OMN" | "PAK" | "PNG" | "PRY" | "PER" | "PHL" | "POL" | "PRT" | "PRI" | "QAT" | "ROU" | "SAU" | "SGP" | "SVK" | "SVN" | "ESP" | "SWE" | "TWN" | "THA" | "TTO" | "TUN" | "TUR" | "GBR" | "USA" | "URY" | "VUT" | "ZMB";