@spritz-finance/api-client 0.4.19 → 0.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -411,7 +411,7 @@ query VirtualAccounts {
|
|
|
411
411
|
virtualAccounts {
|
|
412
412
|
...VirtualAccountFragment
|
|
413
413
|
}
|
|
414
|
-
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};var f4={};function jE(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return f4[t]?!1:(f4[t]=!0,!0)})}ht.definitions=ht.definitions.concat(jE(oi.definitions));function ju(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(u){ju(u,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(u){ju(u,n)}),e.definitions&&e.definitions.forEach(function(u){ju(u,n)})}var fs={};(function(){ht.definitions.forEach(function(n){if(n.name){var t=new Set;ju(n,t),fs[n.name.value]=t}})})();function m4(e,n){for(var t=0;t<e.definitions.length;t++){var u=e.definitions[t];if(u.name&&u.name.value==n)return u}}function LE(e,n){var t={kind:e.kind,definitions:[m4(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var u=fs[n]||new Set,i=new Set,r=new Set;for(u.forEach(function(o){r.add(o)});r.size>0;){var a=r;r=new Set,a.forEach(function(o){if(!i.has(o)){i.add(o);var s=fs[o]||new Set;s.forEach(function(c){r.add(c)})}})}return i.forEach(function(o){var s=m4(e,o);s&&t.definitions.push(s)}),t}LE(ht,"VirtualAccounts");var Me=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Base="base",e.Bitcoin="bitcoin",e.Dash="dash",e.Tron="tron",e.Solana="solana",e.Sui="sui",e))(Me||{});const v4={[Me.Ethereum]:["USDC","USDT","DAI","USDP","PYUSD"],[Me.Polygon]:["USDC"],[Me.Base]:["USDC"],[Me.Arbitrum]:["USDC"],[Me.Avalanche]:["USDC"],[Me.Optimism]:["USDC"],[Me.Solana]:["USDC","PYUSD"],[Me.Tron]:["USDT"]};function ZE(e){const{network:n,token:t}=e,u=v4[n];if(!u||!u.includes(t))throw new Error(`Token "${t}" is not supported on network "${n}". Supported tokens for ${n}: ${u?.join(", ")||"none"}`)}class VE{client;constructor(n){this.client=n}async list(){return(await this.client.query({query:ht})).virtualAccounts}async create(n){return ZE(n),(await this.client.query({query:pt,variables:{network:n.network,address:n.address,token:n.token}})).createVirtualAccount}}var gt={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Payment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryMethod"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentRequestId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyRate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hash"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"from"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:
|
|
414
|
+
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};var f4={};function jE(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return f4[t]?!1:(f4[t]=!0,!0)})}ht.definitions=ht.definitions.concat(jE(oi.definitions));function ju(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(u){ju(u,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(u){ju(u,n)}),e.definitions&&e.definitions.forEach(function(u){ju(u,n)})}var fs={};(function(){ht.definitions.forEach(function(n){if(n.name){var t=new Set;ju(n,t),fs[n.name.value]=t}})})();function m4(e,n){for(var t=0;t<e.definitions.length;t++){var u=e.definitions[t];if(u.name&&u.name.value==n)return u}}function LE(e,n){var t={kind:e.kind,definitions:[m4(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var u=fs[n]||new Set,i=new Set,r=new Set;for(u.forEach(function(o){r.add(o)});r.size>0;){var a=r;r=new Set,a.forEach(function(o){if(!i.has(o)){i.add(o);var s=fs[o]||new Set;s.forEach(function(c){r.add(c)})}})}return i.forEach(function(o){var s=m4(e,o);s&&t.definitions.push(s)}),t}LE(ht,"VirtualAccounts");var Me=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Base="base",e.Bitcoin="bitcoin",e.Dash="dash",e.Tron="tron",e.Solana="solana",e.Sui="sui",e))(Me||{});const v4={[Me.Ethereum]:["USDC","USDT","DAI","USDP","PYUSD"],[Me.Polygon]:["USDC"],[Me.Base]:["USDC"],[Me.Arbitrum]:["USDC"],[Me.Avalanche]:["USDC"],[Me.Optimism]:["USDC"],[Me.Solana]:["USDC","PYUSD"],[Me.Tron]:["USDT"]};function ZE(e){const{network:n,token:t}=e,u=v4[n];if(!u||!u.includes(t))throw new Error(`Token "${t}" is not supported on network "${n}". Supported tokens for ${n}: ${u?.join(", ")||"none"}`)}class VE{client;constructor(n){this.client=n}async list(){return(await this.client.query({query:ht})).virtualAccounts}async create(n){return ZE(n),(await this.client.query({query:pt,variables:{network:n.network,address:n.address,token:n.token}})).createVirtualAccount}}var gt={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Payment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryMethod"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentRequestId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyRate"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"failureReason"},name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hash"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"from"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:348}};gt.loc.source={body:`fragment PaymentFragment on Payment {
|
|
415
415
|
id
|
|
416
416
|
userId
|
|
417
417
|
status
|
|
@@ -424,6 +424,7 @@ query VirtualAccounts {
|
|
|
424
424
|
targetCurrency
|
|
425
425
|
targetCurrencyAmount
|
|
426
426
|
targetCurrencyRate
|
|
427
|
+
failureReason: error
|
|
427
428
|
transaction {
|
|
428
429
|
hash
|
|
429
430
|
from
|
|
@@ -213,6 +213,7 @@ interface AccountPayments_paymentsForAccount {
|
|
|
213
213
|
targetCurrency: string | null;
|
|
214
214
|
targetCurrencyAmount: number;
|
|
215
215
|
targetCurrencyRate: number | null;
|
|
216
|
+
failureReason: string | null;
|
|
216
217
|
transaction: AccountPayments_paymentsForAccount_transaction | null;
|
|
217
218
|
}
|
|
218
219
|
interface AccountPayments {
|
|
@@ -646,6 +647,7 @@ interface Payment_payment {
|
|
|
646
647
|
targetCurrency: string | null;
|
|
647
648
|
targetCurrencyAmount: number;
|
|
648
649
|
targetCurrencyRate: number | null;
|
|
650
|
+
failureReason: string | null;
|
|
649
651
|
transaction: Payment_payment_transaction | null;
|
|
650
652
|
}
|
|
651
653
|
interface Payment {
|
|
@@ -677,6 +679,7 @@ interface PaymentFragment {
|
|
|
677
679
|
targetCurrency: string | null;
|
|
678
680
|
targetCurrencyAmount: number;
|
|
679
681
|
targetCurrencyRate: number | null;
|
|
682
|
+
failureReason: string | null;
|
|
680
683
|
transaction: PaymentFragment_transaction | null;
|
|
681
684
|
}
|
|
682
685
|
|
|
@@ -719,6 +722,7 @@ interface PaymentRequestPayment_paymentForPaymentRequest {
|
|
|
719
722
|
targetCurrency: string | null;
|
|
720
723
|
targetCurrencyAmount: number;
|
|
721
724
|
targetCurrencyRate: number | null;
|
|
725
|
+
failureReason: string | null;
|
|
722
726
|
transaction: PaymentRequestPayment_paymentForPaymentRequest_transaction | null;
|
|
723
727
|
}
|
|
724
728
|
interface PaymentRequestPayment {
|
|
@@ -830,7 +834,7 @@ interface UserAccess_bridgeUser {
|
|
|
830
834
|
interface UserAccess {
|
|
831
835
|
me: UserAccess_me;
|
|
832
836
|
verification: UserAccess_verification | null;
|
|
833
|
-
bridgeUser: UserAccess_bridgeUser;
|
|
837
|
+
bridgeUser: UserAccess_bridgeUser | null;
|
|
834
838
|
}
|
|
835
839
|
|
|
836
840
|
interface UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails {
|
|
@@ -411,7 +411,7 @@ query VirtualAccounts {
|
|
|
411
411
|
virtualAccounts {
|
|
412
412
|
...VirtualAccountFragment
|
|
413
413
|
}
|
|
414
|
-
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};var d4={};function LE(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return d4[t]?!1:(d4[t]=!0,!0)})}ht.definitions=ht.definitions.concat(LE(oi.definitions));function ju(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(u){ju(u,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(u){ju(u,n)}),e.definitions&&e.definitions.forEach(function(u){ju(u,n)})}var fs={};(function(){ht.definitions.forEach(function(n){if(n.name){var t=new Set;ju(n,t),fs[n.name.value]=t}})})();function f4(e,n){for(var t=0;t<e.definitions.length;t++){var u=e.definitions[t];if(u.name&&u.name.value==n)return u}}function ZE(e,n){var t={kind:e.kind,definitions:[f4(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var u=fs[n]||new Set,i=new Set,r=new Set;for(u.forEach(function(o){r.add(o)});r.size>0;){var a=r;r=new Set,a.forEach(function(o){if(!i.has(o)){i.add(o);var s=fs[o]||new Set;s.forEach(function(c){r.add(c)})}})}return i.forEach(function(o){var s=f4(e,o);s&&t.definitions.push(s)}),t}ZE(ht,"VirtualAccounts");var Me=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Base="base",e.Bitcoin="bitcoin",e.Dash="dash",e.Tron="tron",e.Solana="solana",e.Sui="sui",e))(Me||{});const m4={[Me.Ethereum]:["USDC","USDT","DAI","USDP","PYUSD"],[Me.Polygon]:["USDC"],[Me.Base]:["USDC"],[Me.Arbitrum]:["USDC"],[Me.Avalanche]:["USDC"],[Me.Optimism]:["USDC"],[Me.Solana]:["USDC","PYUSD"],[Me.Tron]:["USDT"]};function VE(e){const{network:n,token:t}=e,u=m4[n];if(!u||!u.includes(t))throw new Error(`Token "${t}" is not supported on network "${n}". Supported tokens for ${n}: ${u?.join(", ")||"none"}`)}class qE{client;constructor(n){this.client=n}async list(){return(await this.client.query({query:ht})).virtualAccounts}async create(n){return VE(n),(await this.client.query({query:pt,variables:{network:n.network,address:n.address,token:n.token}})).createVirtualAccount}}var gt={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Payment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryMethod"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentRequestId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyRate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hash"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"from"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:
|
|
414
|
+
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};var d4={};function LE(e){return e.filter(function(n){if(n.kind!=="FragmentDefinition")return!0;var t=n.name.value;return d4[t]?!1:(d4[t]=!0,!0)})}ht.definitions=ht.definitions.concat(LE(oi.definitions));function ju(e,n){if(e.kind==="FragmentSpread")n.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(u){ju(u,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(u){ju(u,n)}),e.definitions&&e.definitions.forEach(function(u){ju(u,n)})}var fs={};(function(){ht.definitions.forEach(function(n){if(n.name){var t=new Set;ju(n,t),fs[n.name.value]=t}})})();function f4(e,n){for(var t=0;t<e.definitions.length;t++){var u=e.definitions[t];if(u.name&&u.name.value==n)return u}}function ZE(e,n){var t={kind:e.kind,definitions:[f4(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var u=fs[n]||new Set,i=new Set,r=new Set;for(u.forEach(function(o){r.add(o)});r.size>0;){var a=r;r=new Set,a.forEach(function(o){if(!i.has(o)){i.add(o);var s=fs[o]||new Set;s.forEach(function(c){r.add(c)})}})}return i.forEach(function(o){var s=f4(e,o);s&&t.definitions.push(s)}),t}ZE(ht,"VirtualAccounts");var Me=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Base="base",e.Bitcoin="bitcoin",e.Dash="dash",e.Tron="tron",e.Solana="solana",e.Sui="sui",e))(Me||{});const m4={[Me.Ethereum]:["USDC","USDT","DAI","USDP","PYUSD"],[Me.Polygon]:["USDC"],[Me.Base]:["USDC"],[Me.Arbitrum]:["USDC"],[Me.Avalanche]:["USDC"],[Me.Optimism]:["USDC"],[Me.Solana]:["USDC","PYUSD"],[Me.Tron]:["USDT"]};function VE(e){const{network:n,token:t}=e,u=m4[n];if(!u||!u.includes(t))throw new Error(`Token "${t}" is not supported on network "${n}". Supported tokens for ${n}: ${u?.join(", ")||"none"}`)}class qE{client;constructor(n){this.client=n}async list(){return(await this.client.query({query:ht})).virtualAccounts}async create(n){return VE(n),(await this.client.query({query:pt,variables:{network:n.network,address:n.address,token:n.token}})).createVirtualAccount}}var gt={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Payment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"feeAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliveryMethod"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentRequestId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetCurrencyRate"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"failureReason"},name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hash"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"from"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:348}};gt.loc.source={body:`fragment PaymentFragment on Payment {
|
|
415
415
|
id
|
|
416
416
|
userId
|
|
417
417
|
status
|
|
@@ -424,6 +424,7 @@ query VirtualAccounts {
|
|
|
424
424
|
targetCurrency
|
|
425
425
|
targetCurrencyAmount
|
|
426
426
|
targetCurrencyRate
|
|
427
|
+
failureReason: error
|
|
427
428
|
transaction {
|
|
428
429
|
hash
|
|
429
430
|
from
|