quoteApi: {
"/v1/withdrawal/quote": {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<
[
TUnion<[(...), (...), (...), (...), (...)]>,
TObject<
{
deviceIpAddress: ...;
deviceLocation: ...;
metadata: ...;
paymentInstrumentId: ...;
sourceCurrency: ...;
targetCurrency: ...;
wallet: ...;
},
>,
TObject<{}>,
TObject<
{ country: ...; sourceAmount: ...; targetAmountAfterFees: ... },
>,
],
>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<
[
TUnion<[(...), (...), (...), (...), (...)]>,
TObject<
{
deviceIpAddress: ...;
deviceLocation: ...;
metadata: ...;
paymentInstrumentId: ...;
sourceCurrency: ...;
targetCurrency: ...;
wallet: ...;
},
>,
TObject<{}>,
TObject<
{ country: ...; sourceAmount: ...; targetAmountAfterFees: ... },
>,
],
>,
],
>,
],
>;
description: "Generate a quote for Withdrawal on the CFX network.\n\nThe Get Estimate endpoint provides a non-binding estimate for a withdrawal transaction.\n\nThis Create Quote generates a binding quote, which includes an unsigned Solana transaction facilitating the transfer of funds from the nominated user wallet into a CFX withdrawal wallet.\n\nSupply either `sourceAmount` (the amount to be debited from wallet) or `targetAmountAfterFees` (the amount to arrive at the destination) to receive a quote.";
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Create Quote";
tags: readonly ["Quote"];
};
};
"/v1/withdrawal/quote/{id}": {
get: {
description: "Retrieves a specific withdrawal quote.";
params: TObject<{ id: TString }>;
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Get Withdrawal Quote";
tags: readonly ["Quote"];
};
};
"/v1/withdrawal/quote/{id}/accept": {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TObject<{ signedTransaction: TString }>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TObject<{ signedTransaction: TString }>,
],
>,
],
>;
description: "Accepts a withdrawal quote for execution.\n\nThis endpoint confirms acceptance of a quote previously generated by the Create Quote endpoint.";
params: TObject<{ id: TString }>;
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<[TObject<(...)>, TUnion<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<[TObject<(...)>, TUnion<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Accept Quote";
tags: readonly ["Quote"];
};
};
"/v1/withdrawal/quote/{id}/reject": {
post: {
description: "Rejects a withdrawal quote.";
params: TObject<{ id: TString }>;
response: {
"200": TObject<{ id: TString }>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Reject Quote";
tags: readonly ["Quote"];
};
};
} = ...
Type Declaration
Readonly/v1/withdrawal/quote: {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<
[
TUnion<[(...), (...), (...), (...), (...)]>,
TObject<
{
deviceIpAddress: ...;
deviceLocation: ...;
metadata: ...;
paymentInstrumentId: ...;
sourceCurrency: ...;
targetCurrency: ...;
wallet: ...;
},
>,
TObject<{}>,
TObject<
{ country: ...; sourceAmount: ...; targetAmountAfterFees: ... },
>,
],
>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<
[
TUnion<[(...), (...), (...), (...), (...)]>,
TObject<
{
deviceIpAddress: ...;
deviceLocation: ...;
metadata: ...;
paymentInstrumentId: ...;
sourceCurrency: ...;
targetCurrency: ...;
wallet: ...;
},
>,
TObject<{}>,
TObject<
{ country: ...; sourceAmount: ...; targetAmountAfterFees: ... },
>,
],
>,
],
>,
],
>;
description: "Generate a quote for Withdrawal on the CFX network.\n\nThe Get Estimate endpoint provides a non-binding estimate for a withdrawal transaction.\n\nThis Create Quote generates a binding quote, which includes an unsigned Solana transaction facilitating the transfer of funds from the nominated user wallet into a CFX withdrawal wallet.\n\nSupply either `sourceAmount` (the amount to be debited from wallet) or `targetAmountAfterFees` (the amount to arrive at the destination) to receive a quote.";
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Create Quote";
tags: readonly ["Quote"];
};
}
Readonly/v1/withdrawal/quote/{id}: {
get: {
description: "Retrieves a specific withdrawal quote.";
params: TObject<{ id: TString }>;
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TUnion<[TIntersect<(...)>, TIntersect<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Get Withdrawal Quote";
tags: readonly ["Quote"];
};
}
Readonly/v1/withdrawal/quote/{id}/accept: {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TObject<{ signedTransaction: TString }>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TObject<{ signedTransaction: TString }>,
],
>,
],
>;
description: "Accepts a withdrawal quote for execution.\n\nThis endpoint confirms acceptance of a quote previously generated by the Create Quote endpoint.";
params: TObject<{ id: TString }>;
response: {
"200": TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<[TObject<(...)>, TUnion<(...)>]>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<[TObject<(...)>, TUnion<(...)>]>,
],
>,
],
>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Accept Quote";
tags: readonly ["Quote"];
};
}
Readonly/v1/withdrawal/quote/{id}/reject: {
post: {
description: "Rejects a withdrawal quote.";
params: TObject<{ id: TString }>;
response: {
"200": TObject<{ id: TString }>;
"400": TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
"404": TObject<
{
code: TLiteral<"notFound">;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
default: TObject<
{
code: TString;
details: TOptional<TRecord<"^.*$", TAny>>;
message: TString;
},
>;
};
summary: "Reject Quote";
tags: readonly ["Quote"];
};
}