diff --git a/layouts/default.vue b/layouts/default.vue
index 03446c69..fcbb0d5d 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -163,32 +163,6 @@
-
-
- Digital Dollar Accounts APIs
-
-
-
-
-
- Overview
-
-
-
-
-
-
-
-
-
-
-
Checkout Sessions APIs
@@ -433,26 +407,6 @@ export default class DefaultLayoutsClass extends Vue {
title: 'PUT /cards/{id}',
to: '/debug/cards/update',
},
- {
- title: 'POST /wallets',
- to: '/debug/wallets/wallets/create',
- },
- {
- title: 'GET /wallets',
- to: '/debug/wallets/wallets/fetch',
- },
- {
- title: 'GET /wallets/{id}',
- to: '/debug/wallets/wallets/details',
- },
- {
- title: 'POST /{walletId}/addresses',
- to: '/debug/wallets/addresses/create',
- },
- {
- title: 'GET /{walletId}/addresses',
- to: '/debug/wallets/addresses/fetch',
- },
{
title: 'GET /settlements',
to: '/debug/settlements/fetch',
@@ -591,18 +545,6 @@ export default class DefaultLayoutsClass extends Vue {
title: 'GET /payouts/{id}',
to: '/debug/payouts/details',
},
- {
- title: 'POST /transfers',
- to: '/debug/wallets/transfers/create',
- },
- {
- title: 'GET /transfers',
- to: '/debug/wallets/transfers/fetch',
- },
- {
- title: 'GET /transfers/{id}',
- to: '/debug/wallets/transfers/details',
- },
]
paymentIntentsLinks = [
@@ -628,41 +570,6 @@ export default class DefaultLayoutsClass extends Vue {
},
]
- digitalDollarAccountsLinks = [
- {
- title: 'POST /wallets',
- to: '/debug/wallets/wallets/create',
- },
- {
- title: 'GET /wallets',
- to: '/debug/wallets/wallets/fetch',
- },
- {
- title: 'GET /wallets/{id}',
- to: '/debug/wallets/wallets/details',
- },
- {
- title: 'POST /{walletId}/addresses',
- to: '/debug/wallets/addresses/create',
- },
- {
- title: 'GET /{walletId}/addresses',
- to: '/debug/wallets/addresses/fetch',
- },
- {
- title: 'POST /transfers',
- to: '/debug/wallets/transfers/create',
- },
- {
- title: 'GET /transfers',
- to: '/debug/wallets/transfers/fetch',
- },
- {
- title: 'GET /transfers/{id}',
- to: '/debug/wallets/transfers/details',
- },
- ]
-
checkoutSessionsLinks = [
{
title: 'POST /checkoutSessions',
diff --git a/lib/addressesApi.ts b/lib/addressesApi.ts
deleted file mode 100644
index b9b234d3..00000000
--- a/lib/addressesApi.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-import get from 'lodash/get'
-import axios from 'axios'
-
-import { getAPIHostname } from './apiTarget'
-
-const instance = axios.create({
- baseURL: getAPIHostname(),
-})
-
-/**
- * Global error handler:
- * Intercepts all axios reponses and maps
- * to errorHandler object
- */
-instance.interceptors.response.use(
- function (response) {
- if (get(response, 'data.data')) {
- return response.data.data
- }
- return response
- },
- function (error) {
- let response = get(error, 'response')
- if (!response) {
- response = error.toJSON()
- }
- return Promise.reject(response)
- }
-)
-
-const nullIfEmpty = (prop: string | undefined) => {
- if (prop !== undefined && prop.trim() === '') {
- return undefined
- }
- return prop
-}
-
-/** Returns the axios instance */
-function getInstance() {
- return instance
-}
-
-/**
- * Get Addresses
- * @param {String} walletId
- * @param {String} from
- * @param {String} to
- * @param {String} pageBefore
- * @param {String} pageAfter
- * @param {String} pageSize
- */
-function getAddresses(
- walletId: string,
- from: string,
- to: string,
- pageBefore: string,
- pageAfter: string,
- pageSize: string
-) {
- const queryParams = {
- from: nullIfEmpty(from),
- to: nullIfEmpty(to),
- pageBefore: nullIfEmpty(pageBefore),
- pageAfter: nullIfEmpty(pageAfter),
- pageSize: nullIfEmpty(pageSize),
- }
-
- const url = `/v1/wallets/${walletId}/addresses`
-
- return instance.get(url, { params: queryParams })
-}
-
-/**
- * Create Address
- * @param {*} payload (contains form data and encrypted Address details)
- */
-function createAddress(
- walletId: string,
- idempotencyKey: string,
- currency: string,
- chain: string
-) {
- const url = `/v1/wallets/${walletId}/addresses`
- const payload = {
- idempotencyKey,
- currency,
- chain,
- }
- return instance.post(url, payload)
-}
-
-export default {
- getInstance,
- getAddresses,
- createAddress,
-}
diff --git a/lib/transfersApi.ts b/lib/transfersApi.ts
deleted file mode 100644
index 1505180c..00000000
--- a/lib/transfersApi.ts
+++ /dev/null
@@ -1,128 +0,0 @@
-import get from 'lodash/get'
-import axios from 'axios'
-
-import { getAPIHostname } from './apiTarget'
-
-export interface BlockchainDestination {
- type: string
- address: string
- chain: string
- addressTag?: string
-}
-
-export interface WalletDestination {
- type: string
- id: string
-}
-
-export interface CreateTransferPayload {
- idempotencyKey: string
- source: {
- type: string
- id: string
- }
- destination: BlockchainDestination | WalletDestination
- amount: {
- amount: string
- currency: string
- }
-}
-
-const instance = axios.create({
- baseURL: getAPIHostname(),
-})
-
-/**
- * Global error handler:
- * Intercepts all axios reponses and maps
- * to errorHandler object
- */
-instance.interceptors.response.use(
- function (response) {
- if (get(response, 'data.data')) {
- return response.data.data
- }
- return response
- },
- function (error) {
- let response = get(error, 'response')
- if (!response) {
- response = error.toJSON()
- }
- return Promise.reject(response)
- }
-)
-
-const nullIfEmpty = (prop: string | undefined) => {
- if (prop !== undefined && prop.trim() === '') {
- return undefined
- }
- return prop
-}
-
-/** Returns the axios instance */
-function getInstance() {
- return instance
-}
-
-/**
- * Get Transfer
- * @param {String} transferId
- */
-function getTransferById(transferId: string) {
- const url = `/v1/transfers/${transferId}`
-
- return instance.get(url)
-}
-
-/**
- * Get transfers
- * @param {String} sourceWalletId
- * @param {String} destinationWalletId
- * @param {String} from
- * @param {String} to
- * @param {String} pageBefore
- * @param {String} pageAfter
- * @param {String} pageSize
- */
-function getTransfers(
- walletId: string,
- sourceWalletId: string,
- destinationWalletId: string,
- from: string,
- to: string,
- pageBefore: string,
- pageAfter: string,
- pageSize: string
-) {
- const queryParams = {
- walletId: nullIfEmpty(walletId),
- sourceWalletId: nullIfEmpty(sourceWalletId),
- destinationWalletId: nullIfEmpty(destinationWalletId),
- from: nullIfEmpty(from),
- to: nullIfEmpty(to),
- pageBefore: nullIfEmpty(pageBefore),
- pageAfter: nullIfEmpty(pageAfter),
- pageSize: nullIfEmpty(pageSize),
- }
-
- const url = '/v1/transfers'
-
- return instance.get(url, { params: queryParams })
-}
-
-/**
- * Create Transfer
- * @param {*} payload (contains form data and encrypted transfer details)
- */
-function createTransfer(payload: CreateTransferPayload) {
- const url = '/v1/transfers'
- return instance.post(url, payload)
-}
-
-export default {
- getInstance,
- getTransfers,
- getTransferById,
- createTransfer,
-}
diff --git a/lib/walletsApi.ts b/lib/walletsApi.ts
index dbe75f66..4e7e04d4 100644
--- a/lib/walletsApi.ts
+++ b/lib/walletsApi.ts
@@ -29,70 +29,11 @@ instance.interceptors.response.use(
}
)
-const nullIfEmpty = (prop: string | undefined) => {
- if (prop !== undefined && prop.trim() === '') {
- return undefined
- }
- return prop
-}
-
/** Returns the axios instance */
function getInstance() {
return instance
}
-/**
- * Get wallet
- * @param {String} walletId
- */
-function getWalletById(walletId: string) {
- const url = `/v1/wallets/${walletId}`
-
- return instance.get(url)
-}
-
-/**
- * Get wallets
- * @param {String} from
- * @param {String} to
- * @param {String} pageBefore
- * @param {String} pageAfter
- * @param {String} pageSize
- */
-function getWallets(
- from: string,
- to: string,
- pageBefore: string,
- pageAfter: string,
- pageSize: string
-) {
- const queryParams = {
- from: nullIfEmpty(from),
- to: nullIfEmpty(to),
- pageBefore: nullIfEmpty(pageBefore),
- pageAfter: nullIfEmpty(pageAfter),
- pageSize: nullIfEmpty(pageSize),
- }
-
- const url = '/v1/wallets'
-
- return instance.get(url, { params: queryParams })
-}
-
-/**
- * Create a wallet
- * @param {String} idempotencyKey
- * @param {String} description
- */
-function createWallet(idempotencyKey: string, description?: string) {
- const url = '/v1/wallets'
- const payload = {
- idempotencyKey,
- description: nullIfEmpty(description),
- }
- return instance.post(url, payload)
-}
-
/**
* Create a wallet
* @param {String} idempotencyKey
@@ -124,9 +65,6 @@ function convertToken(type: string, tokenData: Object) {
export default {
getInstance,
- getWallets,
- getWalletById,
- createWallet,
getMasterWallet,
convertToken,
}
diff --git a/nuxt.config.js b/nuxt.config.js
index 13d9a6cd..dd56a653 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -50,8 +50,6 @@ export default {
'~/plugins/chargebacksApi',
'~/plugins/settlementsApi',
'~/plugins/walletsApi',
- '~/plugins/transfersApi',
- '~/plugins/addressesApi',
'~/plugins/paymentIntentsApi',
'~/plugins/mocksApi',
'~/plugins/businessAccount/addressesApi',
diff --git a/pages/debug/digitalDollarAccounts/index.vue b/pages/debug/digitalDollarAccounts/index.vue
deleted file mode 100644
index 7b2b2098..00000000
--- a/pages/debug/digitalDollarAccounts/index.vue
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- API viewer
-
-
- Make API calls using your private API key. Explore payload and
- response data in the UI.
-
-
-
-
- Wallets endpoints
- Requires: api key
-
- Api endpoints to manage wallets.
-
- POST
- Add wallet
-
-
- GET
- Get all wallets
-
-
- GET
-
-
- Get wallet details by id
-
-
-
-
-
- Addresses endpoints
- Requires: api key
-
- Api endpoints to manage blockchain addresses.
-
- POST
-
- Create blockchain address
-
-
-
- GET
- Get all addresses
-
-
-
-
- Transfers endpoints
- Requires: api key
-
- Api endpoints to manage transfers.
-
- POST
- Add transfer
-
-
- GET
- Get all transfers
-
-
- GET
-
-
- Get transfer details by id
-
-
-
-
-
-
-
-
diff --git a/pages/debug/index.vue b/pages/debug/index.vue
index 23f68fa1..70b1632f 100644
--- a/pages/debug/index.vue
+++ b/pages/debug/index.vue
@@ -115,41 +115,6 @@
-
- On-chain payments endpoints
- Requires: api key
-
- Api endpoints to initiate on-chain payments.
-
- POST
- Add wallet
-
-
- GET
- Get all wallets
-
-
- GET
-
-
- Get wallet details by id
-
-
-
- POST
- Add address
-
-
- GET
- Get all addresses
-
-
-
Settlements endpoints
Requires: api key
diff --git a/pages/debug/payouts/index.vue b/pages/debug/payouts/index.vue
index e53a07c1..ba596301 100644
--- a/pages/debug/payouts/index.vue
+++ b/pages/debug/payouts/index.vue
@@ -32,28 +32,6 @@
Get payout details by id
-
-
- Transfers endpoints
- Requires: api key
-
- Api endpoints to manage transfers.
-
- POST
- Add transfer
-
-
- GET
- Get all transfers
-
-
- GET
-
-
- Get transfer details by id
-
-
-
diff --git a/pages/debug/wallets/addresses/create.vue b/pages/debug/wallets/addresses/create.vue
deleted file mode 100644
index 6dc66ccc..00000000
--- a/pages/debug/wallets/addresses/create.vue
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/addresses/fetch.vue b/pages/debug/wallets/addresses/fetch.vue
deleted file mode 100644
index 429d17f7..00000000
--- a/pages/debug/wallets/addresses/fetch.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/index.vue b/pages/debug/wallets/index.vue
deleted file mode 100644
index e0f5a0e1..00000000
--- a/pages/debug/wallets/index.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
- API viewer
-
-
- Make api calls using your private api key. Explore payload and
- response data in the UI.
-
-
- Please use the settings panel on the right to configure your payments
- api key.
-
-
- (Caution: When using a production api key it will charge your card).
-
-
-
-
- Wallets endpoints
- Requires: api key
-
- Api endpoints to manage wallets.
-
- GET
- Get all wallets
-
-
- GET
-
-
- Get wallet details by id
-
-
-
- POST
- Add wallet
-
-
-
-
- Addresses endpoints
- Requires: api key
-
- Api endpoints to manage blockchain addresses.
-
- GET
- Get all addresses
-
-
- POST
-
- Create blockchain address
-
-
-
-
-
- Transfers endpoints
- Requires: api key
-
- Api endpoints to manage transfers.
-
- GET
- Get all transfers
-
-
- GET
-
-
- Get transfer details by id
-
-
-
- POST
- Add transfer
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/transfers/create.vue b/pages/debug/wallets/transfers/create.vue
deleted file mode 100644
index 5371631e..00000000
--- a/pages/debug/wallets/transfers/create.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Get master wallet id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/transfers/details.vue b/pages/debug/wallets/transfers/details.vue
deleted file mode 100644
index cb18c192..00000000
--- a/pages/debug/wallets/transfers/details.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/transfers/fetch.vue b/pages/debug/wallets/transfers/fetch.vue
deleted file mode 100644
index e85eb7a7..00000000
--- a/pages/debug/wallets/transfers/fetch.vue
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/wallets/create.vue b/pages/debug/wallets/wallets/create.vue
deleted file mode 100644
index c49a10d0..00000000
--- a/pages/debug/wallets/wallets/create.vue
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/wallets/details.vue b/pages/debug/wallets/wallets/details.vue
deleted file mode 100644
index c553b96c..00000000
--- a/pages/debug/wallets/wallets/details.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/debug/wallets/wallets/fetch.vue b/pages/debug/wallets/wallets/fetch.vue
deleted file mode 100644
index b9443ce6..00000000
--- a/pages/debug/wallets/wallets/fetch.vue
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Make api call
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/addressesApi.ts b/plugins/addressesApi.ts
deleted file mode 100644
index 3159567e..00000000
--- a/plugins/addressesApi.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import addressesApi from '@/lib/addressesApi'
-
-declare module 'vue/types/vue' {
- interface Vue {
- $addressesApi: {
- getAddresses: any
- createAddress: any
- getInstance: any
- }
- }
-}
-
-export default ({ store }: any, inject: any) => {
- const instance = addressesApi.getInstance()
-
- instance.interceptors.request.use(
- function (config) {
- store.commit('CLEAR_REQUEST_DATA')
- store.commit('SET_REQUEST_URL', `${config.baseURL}${config.url}`)
- store.commit('SET_REQUEST_PAYLOAD', config.data)
-
- if (store.state.bearerToken) {
- config.headers = { Authorization: `Bearer ${store.state.bearerToken}` }
- }
- return config
- },
- function (error) {
- return Promise.reject(error)
- }
- )
-
- instance.interceptors.response.use(
- function (response) {
- store.commit('SET_RESPONSE', response)
- return response
- },
- function (error) {
- return Promise.reject(error)
- }
- )
-
- inject('addressesApi', addressesApi)
-}
diff --git a/plugins/transfersApi.ts b/plugins/transfersApi.ts
deleted file mode 100644
index e29eda19..00000000
--- a/plugins/transfersApi.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import transfersApi, { CreateTransferPayload } from '@/lib/transfersApi'
-
-declare module 'vue/types/vue' {
- interface Vue {
- $transfersApi: {
- getTransfers: any
- getTransferById: any
- createTransfer: (payload: CreateTransferPayload) => any
- getInstance: any
- }
- }
-}
-
-export default ({ store }: any, inject: any) => {
- const instance = transfersApi.getInstance()
-
- instance.interceptors.request.use(
- function (config) {
- store.commit('CLEAR_REQUEST_DATA')
- store.commit('SET_REQUEST_URL', `${config.baseURL}${config.url}`)
- store.commit('SET_REQUEST_PAYLOAD', config.data)
-
- if (store.state.bearerToken) {
- config.headers = { Authorization: `Bearer ${store.state.bearerToken}` }
- }
- return config
- },
- function (error) {
- return Promise.reject(error)
- }
- )
-
- instance.interceptors.response.use(
- function (response) {
- store.commit('SET_RESPONSE', response)
- return response
- },
- function (error) {
- return Promise.reject(error)
- }
- )
-
- inject('transfersApi', transfersApi)
-}
diff --git a/plugins/walletsApi.ts b/plugins/walletsApi.ts
index c4fde0e5..7767a3b4 100644
--- a/plugins/walletsApi.ts
+++ b/plugins/walletsApi.ts
@@ -3,9 +3,6 @@ import walletsApi from '@/lib/walletsApi'
declare module 'vue/types/vue' {
interface Vue {
$walletsApi: {
- getWallets: any
- getWalletById: any
- createWallet: any
getInstance: any
getMasterWallet: any
convertToken: any