@paxosglobal/sdk 0.0.0-stage → 0.1.0
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.
- package/AGENTS.md +268 -0
- package/CHANGELOG.md +35 -0
- package/LICENSE +191 -0
- package/README.md +445 -2
- package/dist/auth.d.ts +60 -0
- package/dist/auth.js +248 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +353 -0
- package/dist/client.js +967 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +16 -0
- package/dist/constants.js +17 -0
- package/dist/constants.js.map +1 -0
- package/dist/decimal-fields.d.ts +16 -0
- package/dist/decimal-fields.js +570 -0
- package/dist/decimal-fields.js.map +1 -0
- package/dist/decimal.d.ts +25 -0
- package/dist/decimal.js +93 -0
- package/dist/decimal.js.map +1 -0
- package/dist/decode.d.ts +34 -0
- package/dist/decode.js +118 -0
- package/dist/decode.js.map +1 -0
- package/dist/enums.d.ts +1080 -0
- package/dist/enums.js +1031 -0
- package/dist/enums.js.map +1 -0
- package/dist/errors.d.ts +142 -0
- package/dist/errors.js +261 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-types.d.ts +13629 -0
- package/dist/generated-types.js +3 -0
- package/dist/generated-types.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +299 -0
- package/dist/models.js +3 -0
- package/dist/models.js.map +1 -0
- package/dist/paxos-client.d.ts +107 -0
- package/dist/paxos-client.js +157 -0
- package/dist/paxos-client.js.map +1 -0
- package/dist/query-keys.d.ts +1 -0
- package/dist/query-keys.js +31 -0
- package/dist/query-keys.js.map +1 -0
- package/dist/response-defaults.d.ts +2 -0
- package/dist/response-defaults.js +109 -0
- package/dist/response-defaults.js.map +1 -0
- package/dist/services/account-members.d.ts +32 -0
- package/dist/services/account-members.js +46 -0
- package/dist/services/account-members.js.map +1 -0
- package/dist/services/accounts.d.ts +74 -0
- package/dist/services/accounts.js +71 -0
- package/dist/services/accounts.js.map +1 -0
- package/dist/services/address-verification.d.ts +72 -0
- package/dist/services/address-verification.js +64 -0
- package/dist/services/address-verification.js.map +1 -0
- package/dist/services/api-credentials.d.ts +44 -0
- package/dist/services/api-credentials.js +42 -0
- package/dist/services/api-credentials.js.map +1 -0
- package/dist/services/claims.d.ts +68 -0
- package/dist/services/claims.js +67 -0
- package/dist/services/claims.js.map +1 -0
- package/dist/services/cross-chain-transfer.d.ts +71 -0
- package/dist/services/cross-chain-transfer.js +68 -0
- package/dist/services/cross-chain-transfer.js.map +1 -0
- package/dist/services/crypto-deposits.d.ts +30 -0
- package/dist/services/crypto-deposits.js +39 -0
- package/dist/services/crypto-deposits.js.map +1 -0
- package/dist/services/crypto-withdrawals.d.ts +60 -0
- package/dist/services/crypto-withdrawals.js +42 -0
- package/dist/services/crypto-withdrawals.js.map +1 -0
- package/dist/services/deposit-addresses.d.ts +54 -0
- package/dist/services/deposit-addresses.js +36 -0
- package/dist/services/deposit-addresses.js.map +1 -0
- package/dist/services/events.d.ts +53 -0
- package/dist/services/events.js +39 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/exchange.d.ts +52 -0
- package/dist/services/exchange.js +30 -0
- package/dist/services/exchange.js.map +1 -0
- package/dist/services/fees.d.ts +15 -0
- package/dist/services/fees.js +24 -0
- package/dist/services/fees.js.map +1 -0
- package/dist/services/fiat-transfers.d.ts +133 -0
- package/dist/services/fiat-transfers.js +127 -0
- package/dist/services/fiat-transfers.js.map +1 -0
- package/dist/services/identity-controls.d.ts +43 -0
- package/dist/services/identity-controls.js +42 -0
- package/dist/services/identity-controls.js.map +1 -0
- package/dist/services/identity-documents.d.ts +45 -0
- package/dist/services/identity-documents.js +50 -0
- package/dist/services/identity-documents.js.map +1 -0
- package/dist/services/identity.d.ts +122 -0
- package/dist/services/identity.js +66 -0
- package/dist/services/identity.js.map +1 -0
- package/dist/services/index.d.ts +89 -0
- package/dist/services/index.js +55 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/institution-members.d.ts +30 -0
- package/dist/services/institution-members.js +44 -0
- package/dist/services/institution-members.js.map +1 -0
- package/dist/services/internal-transfers.d.ts +15 -0
- package/dist/services/internal-transfers.js +26 -0
- package/dist/services/internal-transfers.js.map +1 -0
- package/dist/services/issuer-quotes.d.ts +72 -0
- package/dist/services/issuer-quotes.js +66 -0
- package/dist/services/issuer-quotes.js.map +1 -0
- package/dist/services/limits.d.ts +20 -0
- package/dist/services/limits.js +23 -0
- package/dist/services/limits.js.map +1 -0
- package/dist/services/market-data.d.ts +15 -0
- package/dist/services/market-data.js +23 -0
- package/dist/services/market-data.js.map +1 -0
- package/dist/services/monitoring-addresses.d.ts +64 -0
- package/dist/services/monitoring-addresses.js +68 -0
- package/dist/services/monitoring-addresses.js.map +1 -0
- package/dist/services/orchestration-rules.d.ts +53 -0
- package/dist/services/orchestration-rules.js +47 -0
- package/dist/services/orchestration-rules.js.map +1 -0
- package/dist/services/orchestrations.d.ts +70 -0
- package/dist/services/orchestrations.js +45 -0
- package/dist/services/orchestrations.js.map +1 -0
- package/dist/services/orders.d.ts +86 -0
- package/dist/services/orders.js +67 -0
- package/dist/services/orders.js.map +1 -0
- package/dist/services/paxos-transfers.d.ts +24 -0
- package/dist/services/paxos-transfers.js +35 -0
- package/dist/services/paxos-transfers.js.map +1 -0
- package/dist/services/payments.d.ts +46 -0
- package/dist/services/payments.js +35 -0
- package/dist/services/payments.js.map +1 -0
- package/dist/services/payout-groups.d.ts +59 -0
- package/dist/services/payout-groups.js +59 -0
- package/dist/services/payout-groups.js.map +1 -0
- package/dist/services/pricing.d.ts +67 -0
- package/dist/services/pricing.js +42 -0
- package/dist/services/pricing.js.map +1 -0
- package/dist/services/profiles.d.ts +106 -0
- package/dist/services/profiles.js +84 -0
- package/dist/services/profiles.js.map +1 -0
- package/dist/services/quote-executions.d.ts +51 -0
- package/dist/services/quote-executions.js +41 -0
- package/dist/services/quote-executions.js.map +1 -0
- package/dist/services/quotes.d.ts +44 -0
- package/dist/services/quotes.js +48 -0
- package/dist/services/quotes.js.map +1 -0
- package/dist/services/reward-addresses.d.ts +80 -0
- package/dist/services/reward-addresses.js +79 -0
- package/dist/services/reward-addresses.js.map +1 -0
- package/dist/services/rewards-statements.d.ts +35 -0
- package/dist/services/rewards-statements.js +32 -0
- package/dist/services/rewards-statements.js.map +1 -0
- package/dist/services/rewards.d.ts +34 -0
- package/dist/services/rewards.js +37 -0
- package/dist/services/rewards.js.map +1 -0
- package/dist/services/sandbox-deposits.d.ts +15 -0
- package/dist/services/sandbox-deposits.js +22 -0
- package/dist/services/sandbox-deposits.js.map +1 -0
- package/dist/services/sandbox-fiat-transfers.d.ts +15 -0
- package/dist/services/sandbox-fiat-transfers.js +24 -0
- package/dist/services/sandbox-fiat-transfers.js.map +1 -0
- package/dist/services/sandbox-identity.d.ts +39 -0
- package/dist/services/sandbox-identity.js +60 -0
- package/dist/services/sandbox-identity.js.map +1 -0
- package/dist/services/settlement.d.ts +76 -0
- package/dist/services/settlement.js +79 -0
- package/dist/services/settlement.js.map +1 -0
- package/dist/services/stablecoin-conversion.d.ts +70 -0
- package/dist/services/stablecoin-conversion.js +65 -0
- package/dist/services/stablecoin-conversion.js.map +1 -0
- package/dist/services/statements.d.ts +44 -0
- package/dist/services/statements.js +35 -0
- package/dist/services/statements.js.map +1 -0
- package/dist/services/tax-documentation.d.ts +21 -0
- package/dist/services/tax-documentation.js +33 -0
- package/dist/services/tax-documentation.js.map +1 -0
- package/dist/services/tax-forms.d.ts +45 -0
- package/dist/services/tax-forms.js +38 -0
- package/dist/services/tax-forms.js.map +1 -0
- package/dist/services/transfers.d.ts +96 -0
- package/dist/services/transfers.js +37 -0
- package/dist/services/transfers.js.map +1 -0
- package/dist/services/travel-rule.d.ts +32 -0
- package/dist/services/travel-rule.js +30 -0
- package/dist/services/travel-rule.js.map +1 -0
- package/dist/services/user-audit-logs.d.ts +45 -0
- package/dist/services/user-audit-logs.js +27 -0
- package/dist/services/user-audit-logs.js.map +1 -0
- package/dist/services/webhooks.d.ts +58 -0
- package/dist/services/webhooks.js +42 -0
- package/dist/services/webhooks.js.map +1 -0
- package/dist/signing.d.ts +33 -0
- package/dist/signing.js +186 -0
- package/dist/signing.js.map +1 -0
- package/dist/testing/fixtures.d.ts +40 -0
- package/dist/testing/fixtures.js +131 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/index.d.ts +28 -0
- package/dist/testing/index.js +28 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-server.d.ts +121 -0
- package/dist/testing/mock-server.js +276 -0
- package/dist/testing/mock-server.js.map +1 -0
- package/dist/timeouts.d.ts +13 -0
- package/dist/timeouts.js +71 -0
- package/dist/timeouts.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +67 -4
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownCryptoNetwork, KnownOrderBy, KnownSortOrder } from "../enums.js";
|
|
3
|
+
import type { CreateCryptoWithdrawalRequest, CryptoDestinationAddress, PutCryptoDestinationAddressRequest, PutCryptoDestinationAddressResponse, Transfer } from "../models.js";
|
|
4
|
+
export interface ListCryptoDestinationAddressesParams {
|
|
5
|
+
/** Optionally filter by the UUIDs of the crypto destination addresses. Limit 100. */
|
|
6
|
+
ids?: string[];
|
|
7
|
+
/** Optionally filter by the Identities the destination addresses are scoped to. Limit 100. */
|
|
8
|
+
identity_ids?: string[];
|
|
9
|
+
/** Optionally filter by the `crypto_network` of the destination addresses. Limit 100. */
|
|
10
|
+
crypto_networks?: (KnownCryptoNetwork | (string & {}))[];
|
|
11
|
+
/** Optionally filter by specific addresses. Limit 100. */
|
|
12
|
+
addresses?: string[];
|
|
13
|
+
/** Optionally filter by specific nicknames. Limit 100. */
|
|
14
|
+
nicknames?: string[];
|
|
15
|
+
/** Optionally filter by bookmarked status. If omitted, addresses regardless of bookmarked status will be returned. */
|
|
16
|
+
bookmarked_status?: boolean;
|
|
17
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
18
|
+
created_at_lt?: string;
|
|
19
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
20
|
+
created_at_lte?: string;
|
|
21
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
22
|
+
created_at_eq?: string;
|
|
23
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
24
|
+
created_at_gte?: string;
|
|
25
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
26
|
+
created_at_gt?: string;
|
|
27
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */
|
|
28
|
+
limit?: number;
|
|
29
|
+
/** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */
|
|
30
|
+
order?: KnownSortOrder | (string & {});
|
|
31
|
+
/** The specific method by which the returned results will be ordered. */
|
|
32
|
+
order_by?: KnownOrderBy | (string & {});
|
|
33
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
34
|
+
page_cursor?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* CryptoWithdrawalsService provides access to CryptoWithdrawals API operations.
|
|
38
|
+
* Access via `client.cryptoWithdrawals`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class CryptoWithdrawalsService {
|
|
41
|
+
private readonly client;
|
|
42
|
+
/**
|
|
43
|
+
* Put Crypto Destination Addresses
|
|
44
|
+
*
|
|
45
|
+
* Requires scope: transfer:write_crypto_destination_address
|
|
46
|
+
*/
|
|
47
|
+
putCryptoDestinationAddress(request: PutCryptoDestinationAddressRequest, opts?: RequestOptions): Promise<WithRaw<PutCryptoDestinationAddressResponse>>;
|
|
48
|
+
/**
|
|
49
|
+
* List Crypto Destination Addresses
|
|
50
|
+
*
|
|
51
|
+
* Requires scope: transfer:read_crypto_destination_address
|
|
52
|
+
*/
|
|
53
|
+
listCryptoDestinationAddresses(params?: ListCryptoDestinationAddressesParams, opts?: RequestOptions): PageIterator<WithRaw<CryptoDestinationAddress>>;
|
|
54
|
+
/**
|
|
55
|
+
* Create Crypto Withdrawal
|
|
56
|
+
*
|
|
57
|
+
* Requires scope: transfer:write_crypto_withdrawal
|
|
58
|
+
*/
|
|
59
|
+
createCryptoWithdrawal(request: CreateCryptoWithdrawalRequest, opts?: RequestOptions): Promise<WithRaw<Transfer>>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
/**
|
|
3
|
+
* CryptoWithdrawalsService provides access to CryptoWithdrawals API operations.
|
|
4
|
+
* Access via `client.cryptoWithdrawals`.
|
|
5
|
+
*/
|
|
6
|
+
export class CryptoWithdrawalsService {
|
|
7
|
+
client;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Put Crypto Destination Addresses
|
|
14
|
+
*
|
|
15
|
+
* Requires scope: transfer:write_crypto_destination_address
|
|
16
|
+
*/
|
|
17
|
+
async putCryptoDestinationAddress(request, opts) {
|
|
18
|
+
return this.client.put("/transfer/crypto-destination-address", request, opts, { responseSchema: "PutCryptoDestinationAddressResponse", requestSchema: "PutCryptoDestinationAddressRequest" });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List Crypto Destination Addresses
|
|
22
|
+
*
|
|
23
|
+
* Requires scope: transfer:read_crypto_destination_address
|
|
24
|
+
*/
|
|
25
|
+
listCryptoDestinationAddresses(params, opts) {
|
|
26
|
+
return this.client.paginate("/transfer/crypto-destination-addresses", "addresses", params, opts, { responseSchema: "ListCryptoDestinationAddressesResponse" });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create Crypto Withdrawal
|
|
30
|
+
*
|
|
31
|
+
* Requires scope: transfer:write_crypto_withdrawal
|
|
32
|
+
*/
|
|
33
|
+
async createCryptoWithdrawal(request, opts) {
|
|
34
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
35
|
+
return this.client.post("/transfer/crypto-withdrawals", body, opts, {
|
|
36
|
+
responseSchema: "Transfer",
|
|
37
|
+
requestSchema: "CreateCryptoWithdrawalRequest",
|
|
38
|
+
replayProtected: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=crypto-withdrawals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-withdrawals.js","sourceRoot":"","sources":["../../src/services/crypto-withdrawals.ts"],"names":[],"mappings":"AAAA,oEAAoE;AA6CpE;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAEN;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAA2C,EAC3C,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,sCAAsC,EACtC,OAAO,EACP,IAAI,EACJ,EAAE,cAAc,EAAE,qCAAqC,EAAE,aAAa,EAAE,oCAAoC,EAAE,CAC/G,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,8BAA8B,CAC5B,MAA6C,EAC7C,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,wCAAwC,EACxC,WAAW,EACX,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,wCAAwC,EAAE,CAC7D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAsC,EACtC,IAAqB;QAErB,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAoB,8BAA8B,EAAE,IAAI,EAAE,IAAI,EAAE;YACrF,cAAc,EAAE,UAAU;YAC1B,aAAa,EAAE,+BAA+B;YAC9C,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownCryptoNetwork, KnownOrderBy, KnownSortOrder } from \"../enums.js\";\nimport type {\n CreateCryptoWithdrawalRequest,\n CryptoDestinationAddress,\n PutCryptoDestinationAddressRequest,\n PutCryptoDestinationAddressResponse,\n Transfer,\n} from \"../models.js\";\n\nexport interface ListCryptoDestinationAddressesParams {\n /** Optionally filter by the UUIDs of the crypto destination addresses. Limit 100. */\n ids?: string[];\n /** Optionally filter by the Identities the destination addresses are scoped to. Limit 100. */\n identity_ids?: string[];\n /** Optionally filter by the `crypto_network` of the destination addresses. Limit 100. */\n crypto_networks?: (KnownCryptoNetwork | (string & {}))[];\n /** Optionally filter by specific addresses. Limit 100. */\n addresses?: string[];\n /** Optionally filter by specific nicknames. Limit 100. */\n nicknames?: string[];\n /** Optionally filter by bookmarked status. If omitted, addresses regardless of bookmarked status will be returned. */\n bookmarked_status?: boolean;\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. */\n order_by?: KnownOrderBy | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * CryptoWithdrawalsService provides access to CryptoWithdrawals API operations.\n * Access via `client.cryptoWithdrawals`.\n */\nexport class CryptoWithdrawalsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * Put Crypto Destination Addresses\n *\n * Requires scope: transfer:write_crypto_destination_address\n */\n async putCryptoDestinationAddress(\n request: PutCryptoDestinationAddressRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<PutCryptoDestinationAddressResponse>> {\n return this.client.put<WithRaw<PutCryptoDestinationAddressResponse>>(\n \"/transfer/crypto-destination-address\",\n request,\n opts,\n { responseSchema: \"PutCryptoDestinationAddressResponse\", requestSchema: \"PutCryptoDestinationAddressRequest\" },\n );\n }\n\n /**\n * List Crypto Destination Addresses\n *\n * Requires scope: transfer:read_crypto_destination_address\n */\n listCryptoDestinationAddresses(\n params?: ListCryptoDestinationAddressesParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<CryptoDestinationAddress>> {\n return this.client.paginate<WithRaw<CryptoDestinationAddress>>(\n \"/transfer/crypto-destination-addresses\",\n \"addresses\",\n params,\n opts,\n { responseSchema: \"ListCryptoDestinationAddressesResponse\" },\n );\n }\n\n /**\n * Create Crypto Withdrawal\n *\n * Requires scope: transfer:write_crypto_withdrawal\n */\n async createCryptoWithdrawal(\n request: CreateCryptoWithdrawalRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<Transfer>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<Transfer>>(\"/transfer/crypto-withdrawals\", body, opts, {\n responseSchema: \"Transfer\",\n requestSchema: \"CreateCryptoWithdrawalRequest\",\n replayProtected: true,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownCryptoNetwork, KnownOrderBy, KnownSortOrder } from "../enums.js";
|
|
3
|
+
import type { CreateDepositAddressRequest, DepositAddress } from "../models.js";
|
|
4
|
+
export interface ListDepositAddressesParams {
|
|
5
|
+
/** Optionally filter by the profile IDs associated with the deposit addresses. Limit 100. */
|
|
6
|
+
profile_ids?: string[];
|
|
7
|
+
/** Optionally filter by the Identities associated with the deposit addresses. Limit 100. */
|
|
8
|
+
identity_ids?: string[];
|
|
9
|
+
/** Optionally filter by the UUIDs of the deposit addresses. Limit 100. */
|
|
10
|
+
ids?: string[];
|
|
11
|
+
/** The client-specified IDs provided during transfer creation. Limit 100. */
|
|
12
|
+
ref_ids?: string[];
|
|
13
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
14
|
+
created_at_lt?: string;
|
|
15
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
16
|
+
created_at_lte?: string;
|
|
17
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
18
|
+
created_at_eq?: string;
|
|
19
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
20
|
+
created_at_gte?: string;
|
|
21
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
22
|
+
created_at_gt?: string;
|
|
23
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */
|
|
24
|
+
limit?: number;
|
|
25
|
+
/** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */
|
|
26
|
+
order?: KnownSortOrder | (string & {});
|
|
27
|
+
/** The specific method by which the returned results will be ordered. */
|
|
28
|
+
order_by?: KnownOrderBy | (string & {});
|
|
29
|
+
/** Optionally filter by the Accounts associated with the deposit address. Limit 100. */
|
|
30
|
+
account_ids?: string[];
|
|
31
|
+
/** Optionally filter by the networks of the deposit addresses. Limit 100. */
|
|
32
|
+
networks?: (KnownCryptoNetwork | (string & {}))[];
|
|
33
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
34
|
+
page_cursor?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* DepositAddressesService provides access to DepositAddresses API operations.
|
|
38
|
+
* Access via `client.depositAddresses`.
|
|
39
|
+
*/
|
|
40
|
+
export declare class DepositAddressesService {
|
|
41
|
+
private readonly client;
|
|
42
|
+
/**
|
|
43
|
+
* List Deposit Addresses
|
|
44
|
+
*
|
|
45
|
+
* Requires scope: transfer:read_deposit_address
|
|
46
|
+
*/
|
|
47
|
+
listDepositAddresses(params?: ListDepositAddressesParams, opts?: RequestOptions): PageIterator<WithRaw<DepositAddress>>;
|
|
48
|
+
/**
|
|
49
|
+
* Create Deposit Address
|
|
50
|
+
*
|
|
51
|
+
* Requires scope: transfer:write_deposit_address
|
|
52
|
+
*/
|
|
53
|
+
createDepositAddress(request: CreateDepositAddressRequest, opts?: RequestOptions): Promise<WithRaw<DepositAddress>>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
/**
|
|
3
|
+
* DepositAddressesService provides access to DepositAddresses API operations.
|
|
4
|
+
* Access via `client.depositAddresses`.
|
|
5
|
+
*/
|
|
6
|
+
export class DepositAddressesService {
|
|
7
|
+
client;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* List Deposit Addresses
|
|
14
|
+
*
|
|
15
|
+
* Requires scope: transfer:read_deposit_address
|
|
16
|
+
*/
|
|
17
|
+
listDepositAddresses(params, opts) {
|
|
18
|
+
return this.client.paginate("/transfer/deposit-addresses", "items", params, opts, {
|
|
19
|
+
responseSchema: "ListDepositAddressesResponse",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create Deposit Address
|
|
24
|
+
*
|
|
25
|
+
* Requires scope: transfer:write_deposit_address
|
|
26
|
+
*/
|
|
27
|
+
async createDepositAddress(request, opts) {
|
|
28
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
29
|
+
return this.client.post("/transfer/deposit-addresses", body, opts, {
|
|
30
|
+
responseSchema: "DepositAddress",
|
|
31
|
+
requestSchema: "CreateDepositAddressRequest",
|
|
32
|
+
replayProtected: true,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=deposit-addresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit-addresses.js","sourceRoot":"","sources":["../../src/services/deposit-addresses.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAuCpE;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAEL;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,oBAAoB,CAClB,MAAmC,EACnC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAA0B,6BAA6B,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YACzG,cAAc,EAAE,8BAA8B;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAoC,EACpC,IAAqB;QAErB,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA0B,6BAA6B,EAAE,IAAI,EAAE,IAAI,EAAE;YAC1F,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,6BAA6B;YAC5C,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownCryptoNetwork, KnownOrderBy, KnownSortOrder } from \"../enums.js\";\nimport type { CreateDepositAddressRequest, DepositAddress } from \"../models.js\";\n\nexport interface ListDepositAddressesParams {\n /** Optionally filter by the profile IDs associated with the deposit addresses. Limit 100. */\n profile_ids?: string[];\n /** Optionally filter by the Identities associated with the deposit addresses. Limit 100. */\n identity_ids?: string[];\n /** Optionally filter by the UUIDs of the deposit addresses. Limit 100. */\n ids?: string[];\n /** The client-specified IDs provided during transfer creation. Limit 100. */\n ref_ids?: string[];\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. */\n order_by?: KnownOrderBy | (string & {});\n /** Optionally filter by the Accounts associated with the deposit address. Limit 100. */\n account_ids?: string[];\n /** Optionally filter by the networks of the deposit addresses. Limit 100. */\n networks?: (KnownCryptoNetwork | (string & {}))[];\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * DepositAddressesService provides access to DepositAddresses API operations.\n * Access via `client.depositAddresses`.\n */\nexport class DepositAddressesService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Deposit Addresses\n *\n * Requires scope: transfer:read_deposit_address\n */\n listDepositAddresses(\n params?: ListDepositAddressesParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<DepositAddress>> {\n return this.client.paginate<WithRaw<DepositAddress>>(\"/transfer/deposit-addresses\", \"items\", params, opts, {\n responseSchema: \"ListDepositAddressesResponse\",\n });\n }\n\n /**\n * Create Deposit Address\n *\n * Requires scope: transfer:write_deposit_address\n */\n async createDepositAddress(\n request: CreateDepositAddressRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<DepositAddress>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<DepositAddress>>(\"/transfer/deposit-addresses\", body, opts, {\n responseSchema: \"DepositAddress\",\n requestSchema: \"CreateDepositAddressRequest\",\n replayProtected: true,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownSortOrder } from "../enums.js";
|
|
3
|
+
import type { Event } from "../models.js";
|
|
4
|
+
export interface ListEventsParams {
|
|
5
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
6
|
+
created_at_lt?: string;
|
|
7
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
8
|
+
created_at_lte?: string;
|
|
9
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
10
|
+
created_at_eq?: string;
|
|
11
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
12
|
+
created_at_gte?: string;
|
|
13
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
14
|
+
created_at_gt?: string;
|
|
15
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. */
|
|
16
|
+
limit?: number;
|
|
17
|
+
/** Retrieve all (default) or optionally filter by event type. */
|
|
18
|
+
type?: string;
|
|
19
|
+
/** Filter for test events (true) or real events (false). Defaults to false (real events only). */
|
|
20
|
+
is_test?: boolean;
|
|
21
|
+
/** Sort order for results by created_at. Defaults to ASC (oldest first). */
|
|
22
|
+
order?: KnownSortOrder | (string & {});
|
|
23
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
24
|
+
page_cursor?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GetEventParams {
|
|
27
|
+
/** Filter for test events (true) or real events (false). Defaults to false (real events only). */
|
|
28
|
+
is_test?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* EventsService — The Events API allows you to fetch events that occurred on
|
|
32
|
+
* the Paxos platform with the full event payload. This REST API can be used as
|
|
33
|
+
* part of your webhook integrations (including rebuilding your event history
|
|
34
|
+
* should your webhook consumer exceed its retries), or standalone by polling
|
|
35
|
+
* for events related to your identities.
|
|
36
|
+
*
|
|
37
|
+
* Access via `client.events`.
|
|
38
|
+
*/
|
|
39
|
+
export declare class EventsService {
|
|
40
|
+
private readonly client;
|
|
41
|
+
/**
|
|
42
|
+
* List Events
|
|
43
|
+
*
|
|
44
|
+
* Requires scope: events:read_event
|
|
45
|
+
*/
|
|
46
|
+
listEvents(params?: ListEventsParams, opts?: RequestOptions): PageIterator<WithRaw<Event>>;
|
|
47
|
+
/**
|
|
48
|
+
* Get Event
|
|
49
|
+
*
|
|
50
|
+
* Requires scope: events:read_event
|
|
51
|
+
*/
|
|
52
|
+
getEvent(id: string, params?: GetEventParams, opts?: RequestOptions): Promise<WithRaw<Event>>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
import { buildPath } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* EventsService — The Events API allows you to fetch events that occurred on
|
|
5
|
+
* the Paxos platform with the full event payload. This REST API can be used as
|
|
6
|
+
* part of your webhook integrations (including rebuilding your event history
|
|
7
|
+
* should your webhook consumer exceed its retries), or standalone by polling
|
|
8
|
+
* for events related to your identities.
|
|
9
|
+
*
|
|
10
|
+
* Access via `client.events`.
|
|
11
|
+
*/
|
|
12
|
+
export class EventsService {
|
|
13
|
+
client;
|
|
14
|
+
/** @internal */
|
|
15
|
+
constructor(client) {
|
|
16
|
+
this.client = client;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List Events
|
|
20
|
+
*
|
|
21
|
+
* Requires scope: events:read_event
|
|
22
|
+
*/
|
|
23
|
+
listEvents(params, opts) {
|
|
24
|
+
return this.client.paginate("/events", "events", params, opts, {
|
|
25
|
+
responseSchema: "ListEventsResponse",
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get Event
|
|
30
|
+
*
|
|
31
|
+
* Requires scope: events:read_event
|
|
32
|
+
*/
|
|
33
|
+
async getEvent(id, params, opts) {
|
|
34
|
+
return this.client.get(buildPath("/events/{id}", { id: id }), params, opts, {
|
|
35
|
+
responseSchema: "Event",
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/services/events.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAiCzC;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAa;IAEK;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,UAAU,CAAC,MAAyB,EAAE,IAAqB;QACzD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAiB,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;YAC7E,cAAc,EAAE,oBAAoB;SACrC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,MAAuB,EAAE,IAAqB;QACvE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,SAAS,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1F,cAAc,EAAE,OAAO;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownSortOrder } from \"../enums.js\";\nimport type { Event } from \"../models.js\";\n\nexport interface ListEventsParams {\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. */\n limit?: number;\n /** Retrieve all (default) or optionally filter by event type. */\n type?: string;\n /** Filter for test events (true) or real events (false). Defaults to false (real events only). */\n is_test?: boolean;\n /** Sort order for results by created_at. Defaults to ASC (oldest first). */\n order?: KnownSortOrder | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface GetEventParams {\n /** Filter for test events (true) or real events (false). Defaults to false (real events only). */\n is_test?: boolean;\n}\n\n/**\n * EventsService — The Events API allows you to fetch events that occurred on\n * the Paxos platform with the full event payload. This REST API can be used as\n * part of your webhook integrations (including rebuilding your event history\n * should your webhook consumer exceed its retries), or standalone by polling\n * for events related to your identities.\n *\n * Access via `client.events`.\n */\nexport class EventsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Events\n *\n * Requires scope: events:read_event\n */\n listEvents(params?: ListEventsParams, opts?: RequestOptions): PageIterator<WithRaw<Event>> {\n return this.client.paginate<WithRaw<Event>>(\"/events\", \"events\", params, opts, {\n responseSchema: \"ListEventsResponse\",\n });\n }\n\n /**\n * Get Event\n *\n * Requires scope: events:read_event\n */\n async getEvent(id: string, params?: GetEventParams, opts?: RequestOptions): Promise<WithRaw<Event>> {\n return this.client.get<WithRaw<Event>>(buildPath(\"/events/{id}\", { id: id }), params, opts, {\n responseSchema: \"Event\",\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownMarket, KnownOrderStatus } from "../enums.js";
|
|
3
|
+
import type { Execution, Order } from "../models.js";
|
|
4
|
+
export interface ListProfileExecutionsParams {
|
|
5
|
+
/** Filter executions for a single order id. */
|
|
6
|
+
order_id?: string;
|
|
7
|
+
/** Excludes executions after this id. */
|
|
8
|
+
since_execution_id?: string;
|
|
9
|
+
/** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
10
|
+
range_begin?: string;
|
|
11
|
+
/** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
12
|
+
range_end?: string;
|
|
13
|
+
/** Number of results to return. */
|
|
14
|
+
limit?: number;
|
|
15
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
16
|
+
page_cursor?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ListProfileOrdersParams {
|
|
19
|
+
/** Filter by the trading pair. */
|
|
20
|
+
market?: KnownMarket | (string & {});
|
|
21
|
+
/** Filter by the status of the order. */
|
|
22
|
+
status?: KnownOrderStatus | (string & {});
|
|
23
|
+
/** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
24
|
+
order_time_begin?: string;
|
|
25
|
+
/** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
26
|
+
order_time_end?: string;
|
|
27
|
+
/** The idempotence ids provided during order creation. */
|
|
28
|
+
ref_ids?: string[];
|
|
29
|
+
/** Number of results to return. If using this then do not use paginationLimit and paginationOffset fields. */
|
|
30
|
+
limit?: number;
|
|
31
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
32
|
+
page_cursor?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* ExchangeService provides access to Exchange API operations.
|
|
36
|
+
* Access via `client.exchange`.
|
|
37
|
+
*/
|
|
38
|
+
export declare class ExchangeService {
|
|
39
|
+
private readonly client;
|
|
40
|
+
/**
|
|
41
|
+
* List Executions
|
|
42
|
+
*
|
|
43
|
+
* Requires scope: exchange:read_order
|
|
44
|
+
*/
|
|
45
|
+
listProfileExecutions(profileId: string, params?: ListProfileExecutionsParams, opts?: RequestOptions): PageIterator<WithRaw<Execution>>;
|
|
46
|
+
/**
|
|
47
|
+
* List Orders
|
|
48
|
+
*
|
|
49
|
+
* Requires scope: exchange:read_order
|
|
50
|
+
*/
|
|
51
|
+
listProfileOrders(profileId: string, params?: ListProfileOrdersParams, opts?: RequestOptions): PageIterator<WithRaw<Order>>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
import { buildPath } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* ExchangeService provides access to Exchange API operations.
|
|
5
|
+
* Access via `client.exchange`.
|
|
6
|
+
*/
|
|
7
|
+
export class ExchangeService {
|
|
8
|
+
client;
|
|
9
|
+
/** @internal */
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* List Executions
|
|
15
|
+
*
|
|
16
|
+
* Requires scope: exchange:read_order
|
|
17
|
+
*/
|
|
18
|
+
listProfileExecutions(profileId, params, opts) {
|
|
19
|
+
return this.client.paginate(buildPath("/profiles/{profile_id}/executions", { profile_id: profileId }), "items", params, opts, { responseSchema: "ListExecutionsResponse" });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* List Orders
|
|
23
|
+
*
|
|
24
|
+
* Requires scope: exchange:read_order
|
|
25
|
+
*/
|
|
26
|
+
listProfileOrders(profileId, params, opts) {
|
|
27
|
+
return this.client.paginate(buildPath("/profiles/{profile_id}/orders", { profile_id: profileId }), "items", params, opts, { responseSchema: "ListOrdersResponse" });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=exchange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/services/exchange.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqCzC;;;GAGG;AACH,MAAM,OAAO,eAAe;IAEG;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,qBAAqB,CACnB,SAAiB,EACjB,MAAoC,EACpC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,SAAS,CAAC,mCAAmC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EACzE,OAAO,EACP,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,wBAAwB,EAAE,CAC7C,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,iBAAiB,CACf,SAAiB,EACjB,MAAgC,EAChC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,SAAS,CAAC,+BAA+B,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EACrE,OAAO,EACP,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,oBAAoB,EAAE,CACzC,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownMarket, KnownOrderStatus } from \"../enums.js\";\nimport type { Execution, Order } from \"../models.js\";\n\nexport interface ListProfileExecutionsParams {\n /** Filter executions for a single order id. */\n order_id?: string;\n /** Excludes executions after this id. */\n since_execution_id?: string;\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n range_end?: string;\n /** Number of results to return. */\n limit?: number;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface ListProfileOrdersParams {\n /** Filter by the trading pair. */\n market?: KnownMarket | (string & {});\n /** Filter by the status of the order. */\n status?: KnownOrderStatus | (string & {});\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n order_time_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n order_time_end?: string;\n /** The idempotence ids provided during order creation. */\n ref_ids?: string[];\n /** Number of results to return. If using this then do not use paginationLimit and paginationOffset fields. */\n limit?: number;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * ExchangeService provides access to Exchange API operations.\n * Access via `client.exchange`.\n */\nexport class ExchangeService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Executions\n *\n * Requires scope: exchange:read_order\n */\n listProfileExecutions(\n profileId: string,\n params?: ListProfileExecutionsParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<Execution>> {\n return this.client.paginate<WithRaw<Execution>>(\n buildPath(\"/profiles/{profile_id}/executions\", { profile_id: profileId }),\n \"items\",\n params,\n opts,\n { responseSchema: \"ListExecutionsResponse\" },\n );\n }\n\n /**\n * List Orders\n *\n * Requires scope: exchange:read_order\n */\n listProfileOrders(\n profileId: string,\n params?: ListProfileOrdersParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<Order>> {\n return this.client.paginate<WithRaw<Order>>(\n buildPath(\"/profiles/{profile_id}/orders\", { profile_id: profileId }),\n \"items\",\n params,\n opts,\n { responseSchema: \"ListOrdersResponse\" },\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestOptions, WithRaw } from "../client.js";
|
|
2
|
+
import type { CreateCryptoWithdrawalFeeRequest, CryptoWithdrawalFee } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* FeesService provides access to Fees API operations.
|
|
5
|
+
* Access via `client.fees`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FeesService {
|
|
8
|
+
private readonly client;
|
|
9
|
+
/**
|
|
10
|
+
* Create Crypto Withdrawal Fee
|
|
11
|
+
*
|
|
12
|
+
* Requires scope: fee:write_crypto_withdrawal_fee
|
|
13
|
+
*/
|
|
14
|
+
createCryptoWithdrawalFee(request: CreateCryptoWithdrawalFeeRequest, opts?: RequestOptions): Promise<WithRaw<CryptoWithdrawalFee>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
/**
|
|
3
|
+
* FeesService provides access to Fees API operations.
|
|
4
|
+
* Access via `client.fees`.
|
|
5
|
+
*/
|
|
6
|
+
export class FeesService {
|
|
7
|
+
client;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create Crypto Withdrawal Fee
|
|
14
|
+
*
|
|
15
|
+
* Requires scope: fee:write_crypto_withdrawal_fee
|
|
16
|
+
*/
|
|
17
|
+
async createCryptoWithdrawalFee(request, opts) {
|
|
18
|
+
return this.client.post("/transfer/fees/crypto-withdrawal", request, opts, {
|
|
19
|
+
responseSchema: "CryptoWithdrawalFee",
|
|
20
|
+
requestSchema: "CreateCryptoWithdrawalFeeRequest",
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=fees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fees.js","sourceRoot":"","sources":["../../src/services/fees.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAKpE;;;GAGG;AACH,MAAM,OAAO,WAAW;IAEO;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,yBAAyB,CAC7B,OAAyC,EACzC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA+B,kCAAkC,EAAE,OAAO,EAAE,IAAI,EAAE;YACvG,cAAc,EAAE,qBAAqB;YACrC,aAAa,EAAE,kCAAkC;SAClD,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, WithRaw } from \"../client.js\";\nimport type { CreateCryptoWithdrawalFeeRequest, CryptoWithdrawalFee } from \"../models.js\";\n\n/**\n * FeesService provides access to Fees API operations.\n * Access via `client.fees`.\n */\nexport class FeesService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * Create Crypto Withdrawal Fee\n *\n * Requires scope: fee:write_crypto_withdrawal_fee\n */\n async createCryptoWithdrawalFee(\n request: CreateCryptoWithdrawalFeeRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<CryptoWithdrawalFee>> {\n return this.client.post<WithRaw<CryptoWithdrawalFee>>(\"/transfer/fees/crypto-withdrawal\", request, opts, {\n responseSchema: \"CryptoWithdrawalFee\",\n requestSchema: \"CreateCryptoWithdrawalFeeRequest\",\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownOrderBy, KnownSortOrder } from "../enums.js";
|
|
3
|
+
import type { CreateFiatAccountRequest, CreateFiatDepositInstructionsRequest, CreateFiatWithdrawalRequest, DeleteFiatAccountResponse, FiatAccount, FiatDepositInstructions, Transfer, UpdateFiatAccountRequest } from "../models.js";
|
|
4
|
+
export interface ListFiatAccountsParams {
|
|
5
|
+
/** Optionally filter by the UUIDs of the accounts. Limit 100. */
|
|
6
|
+
ids?: string[];
|
|
7
|
+
/** Optionally filter by the client-specified IDs provided during account creation. Limit 100. */
|
|
8
|
+
ref_ids?: string[];
|
|
9
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
10
|
+
created_at_lt?: string;
|
|
11
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
12
|
+
created_at_lte?: string;
|
|
13
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
14
|
+
created_at_eq?: string;
|
|
15
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
16
|
+
created_at_gte?: string;
|
|
17
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
18
|
+
created_at_gt?: string;
|
|
19
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */
|
|
20
|
+
limit?: number;
|
|
21
|
+
/** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */
|
|
22
|
+
order?: KnownSortOrder | (string & {});
|
|
23
|
+
/** The specific method by which the returned results will be ordered. Defaults to CREATED_AT. */
|
|
24
|
+
order_by?: KnownOrderBy | (string & {});
|
|
25
|
+
/** Used to include deleted accounts in the response. */
|
|
26
|
+
include_deleted?: boolean;
|
|
27
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
28
|
+
page_cursor?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface GetFiatAccountParams {
|
|
31
|
+
/** Used to include deleted accounts in the response. */
|
|
32
|
+
include_deleted?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ListFiatDepositInstructionsParams {
|
|
35
|
+
/** Optionally filter by the UUIDs of the instructions. Limit 100. */
|
|
36
|
+
ids?: string[];
|
|
37
|
+
/** Optionally filter by the client-specified IDs provided during instructions creation. Limit 100. */
|
|
38
|
+
ref_ids?: string[];
|
|
39
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
40
|
+
created_at_lt?: string;
|
|
41
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
42
|
+
created_at_lte?: string;
|
|
43
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
44
|
+
created_at_eq?: string;
|
|
45
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
46
|
+
created_at_gte?: string;
|
|
47
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
48
|
+
created_at_gt?: string;
|
|
49
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */
|
|
50
|
+
limit?: number;
|
|
51
|
+
/** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */
|
|
52
|
+
order?: KnownSortOrder | (string & {});
|
|
53
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
54
|
+
page_cursor?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* FiatTransfersService — The Fiat Transfers API allows clients to deposit and
|
|
58
|
+
* withdraw fiat via the following Fiat Networks: Wire (Fedwire and SWIFT) and
|
|
59
|
+
* CUBIX. The supported asset is USD.
|
|
60
|
+
*
|
|
61
|
+
* The full set of Fiat Transfers API endpoints is:
|
|
62
|
+
*
|
|
63
|
+
* - For Deposits:
|
|
64
|
+
* - {@link FiatTransfersService.createFiatDepositInstructions | Create Fiat Deposit Instructions}
|
|
65
|
+
* - {@link FiatTransfersService.listFiatDepositInstructions | List Fiat Deposit Instructions}
|
|
66
|
+
* - {@link FiatTransfersService.getFiatDepositInstructions | Get Fiat Deposit Instructions}
|
|
67
|
+
* - For Withdrawals:
|
|
68
|
+
* - {@link FiatTransfersService.createFiatAccount | Create Fiat Account}
|
|
69
|
+
* - {@link FiatTransfersService.listFiatAccounts | List Fiat Accounts}
|
|
70
|
+
* - {@link FiatTransfersService.getFiatAccount | Get Fiat Account}
|
|
71
|
+
* - {@link FiatTransfersService.deleteFiatAccount | Delete Fiat Account}
|
|
72
|
+
* - {@link FiatTransfersService.updateFiatAccount | Update Fiat Account}
|
|
73
|
+
* - {@link FiatTransfersService.createFiatWithdrawal | Create Fiat Withdrawal}
|
|
74
|
+
*
|
|
75
|
+
* Access via `client.fiatTransfers`.
|
|
76
|
+
*/
|
|
77
|
+
export declare class FiatTransfersService {
|
|
78
|
+
private readonly client;
|
|
79
|
+
/**
|
|
80
|
+
* List Fiat Accounts
|
|
81
|
+
*
|
|
82
|
+
* Requires scope: transfer:read_fiat_account
|
|
83
|
+
*/
|
|
84
|
+
listFiatAccounts(params?: ListFiatAccountsParams, opts?: RequestOptions): PageIterator<WithRaw<FiatAccount>>;
|
|
85
|
+
/**
|
|
86
|
+
* Create Fiat Account
|
|
87
|
+
*
|
|
88
|
+
* Requires scope: transfer:write_fiat_account
|
|
89
|
+
*/
|
|
90
|
+
createFiatAccount(request: CreateFiatAccountRequest, opts?: RequestOptions): Promise<WithRaw<FiatAccount>>;
|
|
91
|
+
/**
|
|
92
|
+
* Get Fiat Account
|
|
93
|
+
*
|
|
94
|
+
* Requires scope: transfer:read_fiat_account
|
|
95
|
+
*/
|
|
96
|
+
getFiatAccount(id: string, params?: GetFiatAccountParams, opts?: RequestOptions): Promise<WithRaw<FiatAccount>>;
|
|
97
|
+
/**
|
|
98
|
+
* Delete Fiat Account
|
|
99
|
+
*
|
|
100
|
+
* Requires scope: transfer:write_fiat_account
|
|
101
|
+
*/
|
|
102
|
+
deleteFiatAccount(id: string, opts?: RequestOptions): Promise<WithRaw<DeleteFiatAccountResponse>>;
|
|
103
|
+
/**
|
|
104
|
+
* Update Fiat Account
|
|
105
|
+
*
|
|
106
|
+
* Requires scope: transfer:write_fiat_account
|
|
107
|
+
*/
|
|
108
|
+
updateFiatAccount(id: string, request: UpdateFiatAccountRequest, opts?: RequestOptions): Promise<WithRaw<FiatAccount>>;
|
|
109
|
+
/**
|
|
110
|
+
* List Fiat Deposit Instructions
|
|
111
|
+
*
|
|
112
|
+
* Requires scope: transfer:read_fiat_deposit_instructions
|
|
113
|
+
*/
|
|
114
|
+
listFiatDepositInstructions(params?: ListFiatDepositInstructionsParams, opts?: RequestOptions): PageIterator<WithRaw<FiatDepositInstructions>>;
|
|
115
|
+
/**
|
|
116
|
+
* Create Fiat Deposit Instructions
|
|
117
|
+
*
|
|
118
|
+
* Requires scope: transfer:write_fiat_deposit_instructions
|
|
119
|
+
*/
|
|
120
|
+
createFiatDepositInstructions(request: CreateFiatDepositInstructionsRequest, opts?: RequestOptions): Promise<WithRaw<FiatDepositInstructions>>;
|
|
121
|
+
/**
|
|
122
|
+
* Get Fiat Deposit Instructions
|
|
123
|
+
*
|
|
124
|
+
* Requires scope: transfer:read_fiat_deposit_instructions
|
|
125
|
+
*/
|
|
126
|
+
getFiatDepositInstructions(id: string, opts?: RequestOptions): Promise<WithRaw<FiatDepositInstructions>>;
|
|
127
|
+
/**
|
|
128
|
+
* Create Fiat Withdrawal
|
|
129
|
+
*
|
|
130
|
+
* Requires scope: transfer:write_fiat_withdrawal
|
|
131
|
+
*/
|
|
132
|
+
createFiatWithdrawal(request: CreateFiatWithdrawalRequest, opts?: RequestOptions): Promise<WithRaw<Transfer>>;
|
|
133
|
+
}
|