Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spritz-finance/api-client

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spritz-finance/api-client - npm Package Compare versions

Comparing version 0.2.8 to 0.3.0

103

dist/spritz-api-client.d.ts

@@ -57,2 +57,8 @@ import { DocumentNode } from 'graphql';

}
declare enum OnrampPaymentStatus {
AWAITING_FUNDS = "AWAITING_FUNDS",
CANCELLED = "CANCELLED",
COMPLETED = "COMPLETED",
PENDING = "PENDING"
}
declare enum PayableAccountOriginator {

@@ -100,3 +106,3 @@ Provider = "Provider",

deliveryMethod?: PaymentDeliveryMethod | null;
network?: string | null;
network: string;
provider?: AccountProvider | null;

@@ -108,2 +114,9 @@ rewardsAmount?: number | null;

}
interface CreateOnrampPaymentInput {
address: string;
amount: number;
network: string;
paymentMethod: string;
token: string;
}

@@ -284,2 +297,55 @@ interface CreateBankAccount_createBankAccount_bankAccountDetails_CanadianBankAccountDetails {

interface OnrampPaymentFragment_depositInstructions {
__typename: 'OnrampPaymentDepositInstructions';
amount: number;
currency: string;
bankName: string;
bankAddress: string;
bankBeneficiaryName: string;
bankRoutingNumber: string;
bankAccountNumber: string;
paymentMethod: string;
depositMessage: string;
}
interface OnrampPaymentFragment {
__typename: 'OnRampPayment';
id: string;
amount: number;
feeAmount: number;
depositInstructions: OnrampPaymentFragment_depositInstructions;
network: string;
token: string;
address: string;
status: OnrampPaymentStatus;
createdAt: any;
}
interface OnrampPayments_onrampPayments_depositInstructions {
__typename: 'OnrampPaymentDepositInstructions';
amount: number;
currency: string;
bankName: string;
bankAddress: string;
bankBeneficiaryName: string;
bankRoutingNumber: string;
bankAccountNumber: string;
paymentMethod: string;
depositMessage: string;
}
interface OnrampPayments_onrampPayments {
__typename: 'OnRampPayment';
id: string;
amount: number;
feeAmount: number;
depositInstructions: OnrampPayments_onrampPayments_depositInstructions;
network: string;
token: string;
address: string;
status: OnrampPaymentStatus;
createdAt: any;
}
interface OnrampPayments {
onrampPayments: OnrampPayments_onrampPayments[];
}
interface PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails {

@@ -1160,2 +1226,34 @@ __typename: 'CanadianBankAccountDetails';

interface CreateOnrampPayment_createOnrampPayment_depositInstructions {
__typename: 'OnrampPaymentDepositInstructions';
amount: number;
currency: string;
bankName: string;
bankAddress: string;
bankBeneficiaryName: string;
bankRoutingNumber: string;
bankAccountNumber: string;
paymentMethod: string;
depositMessage: string;
}
interface CreateOnrampPayment_createOnrampPayment {
__typename: 'OnRampPayment';
id: string;
amount: number;
feeAmount: number;
depositInstructions: CreateOnrampPayment_createOnrampPayment_depositInstructions;
network: string;
token: string;
address: string;
status: OnrampPaymentStatus;
createdAt: any;
}
declare class OnrampPaymentService {
private client;
constructor(client: SpritzClient);
create(createOnrampPaymentInput: CreateOnrampPaymentInput): Promise<CreateOnrampPayment_createOnrampPayment>;
list(): Promise<OnrampPayments_onrampPayments[]>;
}
declare class PaymentService {

@@ -1353,2 +1451,3 @@ private client;

payment: PaymentService;
onrampPayment: OnrampPaymentService;
virtualCard: VirtualCardService;

@@ -1364,2 +1463,2 @@ bill: BillService;

export { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountInput, BankAccountSubType, BankAccountType, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillType, CreateDirectPaymentInput, CreatePaymentRequestInput, CurrentUser, CurrentUser_me, Environment, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, PayableAccountType, Payment, PaymentFragment, PaymentNetwork, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, DirectPaymentStatus as PaymentRequestStatus, PaymentStatus, PaymentVariables, Payment_payment, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, SpritzApiClient, TokenBalanceFragment, TransactionPrice, TransactionPriceVariables, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, VirtualCardType, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances };
export { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountInput, BankAccountSubType, BankAccountType, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillType, CreateDirectPaymentInput, CreateOnrampPaymentInput, CreatePaymentRequestInput, CurrentUser, CurrentUser_me, Environment, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, OnrampPaymentFragment, OnrampPaymentFragment_depositInstructions, OnrampPayments, OnrampPayments_onrampPayments, OnrampPayments_onrampPayments_depositInstructions, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, PayableAccountType, Payment, PaymentFragment, PaymentNetwork, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, DirectPaymentStatus as PaymentRequestStatus, PaymentStatus, PaymentVariables, Payment_payment, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, SpritzApiClient, TokenBalanceFragment, TransactionPrice, TransactionPriceVariables, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, VirtualCardType, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances };

2

package.json
{
"name": "@spritz-finance/api-client",
"version": "0.2.8",
"version": "0.3.0",
"description": "Typescript library for interacting with the Spritz Finance API",

@@ -5,0 +5,0 @@ "main": "dist/spritz-api-client.js",

@@ -68,2 +68,5 @@ # @spritz-finance/api-client

- [Retrieve all payments for an account](#retrieve-all-payments-for-an-account)
- [Onramp Payments](#onramp-payments)
- [Create an onramp payment](#create-onramp-payment)
- [Retrieve all onramp payments for an account](#retrieve-all-onramp-payments-for-an-account)
- [Webhooks](#webhooks)

@@ -424,3 +427,3 @@ - [Supported webhook events](#supported-webhook-events)

createdAt: '2023-05-03T11:25:02.401Z',
deliveryMethods: ['STANDARD']
deliveryMethods: ['STANDARD'],
},

@@ -692,2 +695,77 @@ ]

## Onramp Payments
Onramp Payments are orders to buy crypto stablecoins with a bank transfer. Upon creating an onramp payment, you will receive deposit instructions to fulfill that order. When the bank transfer has been received and disbursed, the status of that onramp payment will change.
### Create onramp payment
```typescript
const onrampPayment = await client.onrampPayment.create({
token: 'USDC' // Supported: currently only 'USDC'
network: 'ethereum' // supported: 'ethereum', 'polygon', 'avalanche'
amount: 100, // How much token to purchase (100 USDC)
address: '0xbB76483e33e01315438D8F6CF1Aee9C9b85f433b', // Wallet address to disburse tokens to
paymentMethod: 'ACH' // 'WIRE' or 'ACH'
});
// Example response
{
"id": "653fab35ad263e5ae8b0e605",
"amount": 100,
"feeAmount": 1.5,
"depositInstructions": {
"amount": 101.5,
"currency": "USD",
"bankName": "Bank of Nowhere",
"bankAddress": "1800 North Pole St., Orlando, FL 32801",
"bankBeneficiaryName": "Bridge Ventures Inc",
"bankRoutingNumber": "123456789",
"bankAccountNumber": "11223344556677",
"paymentMethod": "WIRE",
"depositMessage": "BVI72D90851F051F4189",
},
"network": "ethereum",
"token": "USDC",
"address": "0xbb76483e33e01315438d8f6cf1aee9c9b85f433b",
"status": "AWAITING_FUNDS",
"createdAt": "2023-10-30T13:10:13.521Z",
}
```
### Retrieve all onramp payments for an account
```typescript
const payments = await client.onrampPayment.list()
// Example response
[
{
"id": "653fab35ad263e5ae8b0e605",
"amount": 100,
"feeAmount": 1.5,
"depositInstructions": {
"amount": 101.5,
"currency": "USD",
"bankName": "Bank of Nowhere",
"bankAddress": "1800 North Pole St., Orlando, FL 32801",
"bankBeneficiaryName": "Bridge Ventures Inc",
"bankRoutingNumber": "123456789",
"bankAccountNumber": "11223344556677",
"paymentMethod": "WIRE",
"depositMessage": "BVI72D90851F051F4189"
},
"network": "ethereum",
"token": "USDC",
"address": "0xbb76483e33e01315438d8f6cf1aee9c9b85f433b",
"status": "AWAITING_FUNDS",
"createdAt": "2023-10-30T13:10:13.521Z"
}
]
```
## Webhooks

@@ -694,0 +772,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc