@coinlist-co/react 0.2.0 → 0.4.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.
Files changed (67) hide show
  1. package/dist/RequirementItem-B-MvcxSr.d.cts +37 -0
  2. package/dist/RequirementItem-DcYot2uC.d.ts +37 -0
  3. package/dist/chunk-EHZ6PIGN.js +414 -0
  4. package/dist/chunk-EHZ6PIGN.js.map +1 -0
  5. package/dist/chunk-NC45IO63.js +777 -0
  6. package/dist/chunk-NC45IO63.js.map +1 -0
  7. package/dist/chunk-RIFATQB5.js +257 -0
  8. package/dist/chunk-RIFATQB5.js.map +1 -0
  9. package/dist/chunk-UGJUTRXC.js +304 -0
  10. package/dist/chunk-UGJUTRXC.js.map +1 -0
  11. package/dist/client/components/index.cjs +473 -10
  12. package/dist/client/components/index.cjs.map +1 -1
  13. package/dist/client/components/index.d.cts +80 -12
  14. package/dist/client/components/index.d.ts +80 -12
  15. package/dist/client/components/index.js +243 -243
  16. package/dist/client/components/index.js.map +1 -1
  17. package/dist/client/core/index.cjs +349 -202
  18. package/dist/client/core/index.cjs.map +1 -1
  19. package/dist/client/core/index.d.cts +4 -4
  20. package/dist/client/core/index.d.ts +4 -4
  21. package/dist/client/core/index.js +16 -14
  22. package/dist/client/hooks/index.cjs +133 -16
  23. package/dist/client/hooks/index.cjs.map +1 -1
  24. package/dist/client/hooks/index.d.cts +102 -8
  25. package/dist/client/hooks/index.d.ts +102 -8
  26. package/dist/client/hooks/index.js +11 -9
  27. package/dist/client/index.cjs +591 -210
  28. package/dist/client/index.cjs.map +1 -1
  29. package/dist/client/index.d.cts +7 -6
  30. package/dist/client/index.d.ts +7 -6
  31. package/dist/client/index.js +41 -17
  32. package/dist/client/styles.css +1 -1
  33. package/dist/coinlist-client-BSxpqylo.d.ts +158 -0
  34. package/dist/coinlist-client-Cah5c_aF.d.cts +158 -0
  35. package/dist/participation-DMMEDxON.d.cts +185 -0
  36. package/dist/participation-E-bT-GXJ.d.ts +185 -0
  37. package/dist/requirement-XWT0T_zO.d.cts +205 -0
  38. package/dist/requirement-XWT0T_zO.d.ts +205 -0
  39. package/dist/server/index.cjs +519 -14
  40. package/dist/server/index.cjs.map +1 -1
  41. package/dist/server/index.d.cts +73 -4
  42. package/dist/server/index.d.ts +73 -4
  43. package/dist/server/index.js +116 -20
  44. package/dist/server/index.js.map +1 -1
  45. package/dist/useCoinListRequirements-B5-ZPOMz.d.ts +80 -0
  46. package/dist/useCoinListRequirements-Cuc32Tqw.d.cts +80 -0
  47. package/package.json +4 -4
  48. package/dist/chunk-32GOUV3L.js +0 -118
  49. package/dist/chunk-32GOUV3L.js.map +0 -1
  50. package/dist/chunk-G3B4RLXP.js +0 -76
  51. package/dist/chunk-G3B4RLXP.js.map +0 -1
  52. package/dist/chunk-GRVV7NLV.js +0 -282
  53. package/dist/chunk-GRVV7NLV.js.map +0 -1
  54. package/dist/chunk-Z5RFQOMS.js +0 -560
  55. package/dist/chunk-Z5RFQOMS.js.map +0 -1
  56. package/dist/coinlist-client-20v7fJSW.d.ts +0 -394
  57. package/dist/coinlist-client-Ds86ycAg.d.cts +0 -394
  58. package/dist/newtype-yKTvFdg_.d.cts +0 -6
  59. package/dist/newtype-yKTvFdg_.d.ts +0 -6
  60. package/dist/oauth-session-DgItaMKN.d.cts +0 -56
  61. package/dist/oauth-session-DnKDI5ou.d.ts +0 -56
  62. package/dist/offer-D6p_Ijme.d.cts +0 -30
  63. package/dist/offer-DnFEFJw9.d.ts +0 -30
  64. package/dist/useCoinListOffers-DIdOb5hB.d.ts +0 -27
  65. package/dist/useCoinListOffers-DvJxu6qj.d.cts +0 -27
  66. package/dist/useCompleteCoinListOAuth-C359mp_k.d.cts +0 -55
  67. package/dist/useCompleteCoinListOAuth-wZX3o8r2.d.ts +0 -55
@@ -0,0 +1,185 @@
1
+ import { N as Newtype, A as AssetDto, b as OfferId, d as OfferOptionId, k as Asset, l as AssetId } from './requirement-XWT0T_zO.cjs';
2
+
3
+ type AuthorizationCode = Newtype<string, 'AuthorizationCode'>;
4
+ declare const AuthorizationCode: (value: string) => AuthorizationCode;
5
+ type CodeVerifier = Newtype<string, 'CodeVerifier'>;
6
+ declare const CodeVerifier: (value: string) => CodeVerifier;
7
+ type CodeChallenge = Newtype<string, 'CodeChallenge'>;
8
+ declare const CodeChallenge: (value: string) => CodeChallenge;
9
+ type RedirectUri = Newtype<string, 'RedirectUri'>;
10
+ declare const RedirectUri: (value: string) => RedirectUri;
11
+ type ClientId = Newtype<string, 'ClientId'>;
12
+ declare const ClientId: (value: string) => ClientId;
13
+ type ClientSecret = Newtype<string, 'ClientSecret'>;
14
+ declare const ClientSecret: (value: string) => ClientSecret;
15
+
16
+ type QueryParamValue = string | number | boolean | null | undefined;
17
+
18
+ type Cursor = Newtype<string, 'Cursor'>;
19
+ declare const Cursor: (value: string) => Cursor;
20
+ interface PaginatedResponseDto<T> {
21
+ data: T[];
22
+ starting_after?: string;
23
+ starting_before?: string;
24
+ }
25
+ declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
26
+ interface PaginatedResponse<T> {
27
+ data: T[];
28
+ startingAfter: Cursor | null;
29
+ startingBefore: Cursor | null;
30
+ }
31
+ declare const PaginatedResponse: {
32
+ fromDto: <A, B>(dto: PaginatedResponseDto<A>, itemMapper: (item: A) => B) => PaginatedResponse<B>;
33
+ };
34
+ /**
35
+ * Cursor-based pagination input used when requesting paginated API resources.
36
+ * Set `after` or `before` to navigate relative to a known cursor, and `limit`
37
+ * to control the maximum number of returned items.
38
+ */
39
+ interface PaginationParams {
40
+ before?: Cursor;
41
+ after?: Cursor;
42
+ limit?: number;
43
+ }
44
+ declare const PaginationParams: {
45
+ toQueryParams: (params: PaginationParams) => Record<string, QueryParamValue>;
46
+ };
47
+
48
+ interface Config {
49
+ /** OAuth2 public identifier. */
50
+ readonly clientId: ClientId;
51
+ /**
52
+ * OAuth2 redirect URI. Recommended to point to a frontend page where
53
+ * {@link CoinListClient#completeOauth} can be called to complete the PKCE
54
+ * flow on the client side.
55
+ */
56
+ readonly redirectUri: RedirectUri;
57
+ /**
58
+ * Recommended to leave undefined. Used to change the CoinList environment;
59
+ * default is production.
60
+ */
61
+ readonly baseUrl?: string;
62
+ }
63
+
64
+ /**
65
+ * OAuth 2.0 token response (RFC 6749 §5.1).
66
+ * Maps to OpenAPI schema OauthToken.
67
+ */
68
+ type OAuthSessionDto = {
69
+ access_token: string;
70
+ expires_in: number;
71
+ refresh_token?: string;
72
+ };
73
+
74
+ type OAuthAccessToken = {
75
+ value: string;
76
+ expiresAt: Date;
77
+ };
78
+ type OAuthRefreshToken = Newtype<string, 'OAuthRefreshToken'>;
79
+ declare const OAuthRefreshToken: (value: string) => OAuthRefreshToken;
80
+ type OAuthSession = {
81
+ accessToken: OAuthAccessToken;
82
+ refreshToken?: OAuthRefreshToken;
83
+ };
84
+ declare const OAuthSession: {
85
+ fromDto: (dto: OAuthSessionDto) => OAuthSession;
86
+ };
87
+
88
+ type ParticipationStatusDto = 'prepared' | 'pending' | 'submitted' | 'completed' | 'failed' | 'remit_submitted' | 'remitted' | 'remit_failed';
89
+ type ParticipationDto = {
90
+ object: 'participation';
91
+ id: string;
92
+ offer_id: string;
93
+ offer_option_id: string;
94
+ status: ParticipationStatusDto;
95
+ amount: string;
96
+ amount_string: string;
97
+ asset: AssetDto;
98
+ chain: string;
99
+ inserted_at: string | null | undefined;
100
+ updated_at: string | null | undefined;
101
+ wallet_address: string | null | undefined;
102
+ };
103
+ type CreateParticipationDto = {
104
+ offer_id: string;
105
+ offer_option_id: string;
106
+ chain: string;
107
+ wallet_address: string;
108
+ amount: string;
109
+ asset_id: string;
110
+ approval_transaction_hash: string | null | undefined;
111
+ };
112
+
113
+ /** Unique identifier for a participation. */
114
+ type ParticipationId = Newtype<string, 'ParticipationId'>;
115
+ /** Casts a string into a typed {@link ParticipationId}. */
116
+ declare const ParticipationId: (value: string) => ParticipationId;
117
+ /** Blockchain identifier for where a participation is funded. */
118
+ type Blockchain = Newtype<string, 'Blockchain'>;
119
+ /** Casts a string into a typed {@link Blockchain}. */
120
+ declare const Blockchain: (value: string) => Blockchain;
121
+ /** Wallet address used for a participation. */
122
+ type WalletAddress = Newtype<string, 'WalletAddress'>;
123
+ /** Casts a string into a typed {@link WalletAddress}. */
124
+ declare const WalletAddress: (value: string) => WalletAddress;
125
+ /** Possible participation lifecycle states returned by the API. */
126
+ type ParticipationStatus = ParticipationStatusDto;
127
+ /** Pagination params for listing participations, with an optional offer filter. */
128
+ interface ParticipationsPaginationParams extends PaginationParams {
129
+ offerId?: OfferId;
130
+ }
131
+ declare const ParticipationsPaginationParams: {
132
+ toQueryParams: (params: ParticipationsPaginationParams) => Record<string, QueryParamValue>;
133
+ };
134
+ /** Domain model for a participation returned by CoinList APIs. */
135
+ type Participation = {
136
+ /** Unique participation id. */
137
+ id: ParticipationId;
138
+ /** Parent offer id. */
139
+ offerId: OfferId;
140
+ /** Selected offer option id. */
141
+ offerOptionId: OfferOptionId;
142
+ /** Current processing status. */
143
+ status: ParticipationStatus;
144
+ /** Raw participation amount from API. */
145
+ amount: string;
146
+ /** Human-readable formatted amount from API. */
147
+ displayAmount: string;
148
+ /** Asset metadata for the participation amount. */
149
+ asset: Asset;
150
+ /** Funding chain identifier. */
151
+ chain: Blockchain;
152
+ /** Creation timestamp, if returned by API. */
153
+ insertedAt: Date | null;
154
+ /** Last update timestamp, if returned by API. */
155
+ updatedAt: Date | null;
156
+ /** Wallet used for participation, blank values normalized to null. */
157
+ walletAddress: WalletAddress | null;
158
+ };
159
+ declare const Participation: {
160
+ /** Maps API DTO shape into the SDK participation domain model. */
161
+ fromDto: (dto: ParticipationDto) => Participation;
162
+ };
163
+ /** Parameters required to create a new participation. */
164
+ type CreateParticipationParams = {
165
+ /** Offer to participate in. */
166
+ offerId: OfferId;
167
+ /** Offer option selected for participation. */
168
+ offerOptionId: OfferOptionId;
169
+ /** Blockchain for funding. */
170
+ chain: Blockchain;
171
+ /** Wallet address that funds the participation. */
172
+ walletAddress: WalletAddress;
173
+ /** Raw amount to participate with. */
174
+ amount: string;
175
+ /** Funding asset id. */
176
+ assetId: AssetId;
177
+ /** Optional approval transaction hash, if applicable. */
178
+ approvalTransactionHash?: string | null;
179
+ };
180
+ declare const CreateParticipationParams: {
181
+ /** Maps participation creation params into API DTO payload. */
182
+ toDto: (params: CreateParticipationParams) => CreateParticipationDto;
183
+ };
184
+
185
+ export { AuthorizationCode as A, Blockchain as B, ClientId as C, type OAuthAccessToken as O, PaginatedResponse as P, RedirectUri as R, WalletAddress as W, ClientSecret as a, CodeChallenge as b, CodeVerifier as c, CreateParticipationParams as d, Cursor as e, OAuthRefreshToken as f, OAuthSession as g, type PaginatedResponseDto as h, PaginationParams as i, Participation as j, ParticipationId as k, type ParticipationStatus as l, ParticipationsPaginationParams as m, fetchAllPages as n, type Config as o };
@@ -0,0 +1,185 @@
1
+ import { N as Newtype, A as AssetDto, b as OfferId, d as OfferOptionId, k as Asset, l as AssetId } from './requirement-XWT0T_zO.js';
2
+
3
+ type AuthorizationCode = Newtype<string, 'AuthorizationCode'>;
4
+ declare const AuthorizationCode: (value: string) => AuthorizationCode;
5
+ type CodeVerifier = Newtype<string, 'CodeVerifier'>;
6
+ declare const CodeVerifier: (value: string) => CodeVerifier;
7
+ type CodeChallenge = Newtype<string, 'CodeChallenge'>;
8
+ declare const CodeChallenge: (value: string) => CodeChallenge;
9
+ type RedirectUri = Newtype<string, 'RedirectUri'>;
10
+ declare const RedirectUri: (value: string) => RedirectUri;
11
+ type ClientId = Newtype<string, 'ClientId'>;
12
+ declare const ClientId: (value: string) => ClientId;
13
+ type ClientSecret = Newtype<string, 'ClientSecret'>;
14
+ declare const ClientSecret: (value: string) => ClientSecret;
15
+
16
+ type QueryParamValue = string | number | boolean | null | undefined;
17
+
18
+ type Cursor = Newtype<string, 'Cursor'>;
19
+ declare const Cursor: (value: string) => Cursor;
20
+ interface PaginatedResponseDto<T> {
21
+ data: T[];
22
+ starting_after?: string;
23
+ starting_before?: string;
24
+ }
25
+ declare function fetchAllPages<A, P extends PaginationParams = PaginationParams>(fetchPage: (params: P) => Promise<PaginatedResponse<A>>, baseParams?: Omit<P, keyof PaginationParams>): Promise<A[]>;
26
+ interface PaginatedResponse<T> {
27
+ data: T[];
28
+ startingAfter: Cursor | null;
29
+ startingBefore: Cursor | null;
30
+ }
31
+ declare const PaginatedResponse: {
32
+ fromDto: <A, B>(dto: PaginatedResponseDto<A>, itemMapper: (item: A) => B) => PaginatedResponse<B>;
33
+ };
34
+ /**
35
+ * Cursor-based pagination input used when requesting paginated API resources.
36
+ * Set `after` or `before` to navigate relative to a known cursor, and `limit`
37
+ * to control the maximum number of returned items.
38
+ */
39
+ interface PaginationParams {
40
+ before?: Cursor;
41
+ after?: Cursor;
42
+ limit?: number;
43
+ }
44
+ declare const PaginationParams: {
45
+ toQueryParams: (params: PaginationParams) => Record<string, QueryParamValue>;
46
+ };
47
+
48
+ interface Config {
49
+ /** OAuth2 public identifier. */
50
+ readonly clientId: ClientId;
51
+ /**
52
+ * OAuth2 redirect URI. Recommended to point to a frontend page where
53
+ * {@link CoinListClient#completeOauth} can be called to complete the PKCE
54
+ * flow on the client side.
55
+ */
56
+ readonly redirectUri: RedirectUri;
57
+ /**
58
+ * Recommended to leave undefined. Used to change the CoinList environment;
59
+ * default is production.
60
+ */
61
+ readonly baseUrl?: string;
62
+ }
63
+
64
+ /**
65
+ * OAuth 2.0 token response (RFC 6749 §5.1).
66
+ * Maps to OpenAPI schema OauthToken.
67
+ */
68
+ type OAuthSessionDto = {
69
+ access_token: string;
70
+ expires_in: number;
71
+ refresh_token?: string;
72
+ };
73
+
74
+ type OAuthAccessToken = {
75
+ value: string;
76
+ expiresAt: Date;
77
+ };
78
+ type OAuthRefreshToken = Newtype<string, 'OAuthRefreshToken'>;
79
+ declare const OAuthRefreshToken: (value: string) => OAuthRefreshToken;
80
+ type OAuthSession = {
81
+ accessToken: OAuthAccessToken;
82
+ refreshToken?: OAuthRefreshToken;
83
+ };
84
+ declare const OAuthSession: {
85
+ fromDto: (dto: OAuthSessionDto) => OAuthSession;
86
+ };
87
+
88
+ type ParticipationStatusDto = 'prepared' | 'pending' | 'submitted' | 'completed' | 'failed' | 'remit_submitted' | 'remitted' | 'remit_failed';
89
+ type ParticipationDto = {
90
+ object: 'participation';
91
+ id: string;
92
+ offer_id: string;
93
+ offer_option_id: string;
94
+ status: ParticipationStatusDto;
95
+ amount: string;
96
+ amount_string: string;
97
+ asset: AssetDto;
98
+ chain: string;
99
+ inserted_at: string | null | undefined;
100
+ updated_at: string | null | undefined;
101
+ wallet_address: string | null | undefined;
102
+ };
103
+ type CreateParticipationDto = {
104
+ offer_id: string;
105
+ offer_option_id: string;
106
+ chain: string;
107
+ wallet_address: string;
108
+ amount: string;
109
+ asset_id: string;
110
+ approval_transaction_hash: string | null | undefined;
111
+ };
112
+
113
+ /** Unique identifier for a participation. */
114
+ type ParticipationId = Newtype<string, 'ParticipationId'>;
115
+ /** Casts a string into a typed {@link ParticipationId}. */
116
+ declare const ParticipationId: (value: string) => ParticipationId;
117
+ /** Blockchain identifier for where a participation is funded. */
118
+ type Blockchain = Newtype<string, 'Blockchain'>;
119
+ /** Casts a string into a typed {@link Blockchain}. */
120
+ declare const Blockchain: (value: string) => Blockchain;
121
+ /** Wallet address used for a participation. */
122
+ type WalletAddress = Newtype<string, 'WalletAddress'>;
123
+ /** Casts a string into a typed {@link WalletAddress}. */
124
+ declare const WalletAddress: (value: string) => WalletAddress;
125
+ /** Possible participation lifecycle states returned by the API. */
126
+ type ParticipationStatus = ParticipationStatusDto;
127
+ /** Pagination params for listing participations, with an optional offer filter. */
128
+ interface ParticipationsPaginationParams extends PaginationParams {
129
+ offerId?: OfferId;
130
+ }
131
+ declare const ParticipationsPaginationParams: {
132
+ toQueryParams: (params: ParticipationsPaginationParams) => Record<string, QueryParamValue>;
133
+ };
134
+ /** Domain model for a participation returned by CoinList APIs. */
135
+ type Participation = {
136
+ /** Unique participation id. */
137
+ id: ParticipationId;
138
+ /** Parent offer id. */
139
+ offerId: OfferId;
140
+ /** Selected offer option id. */
141
+ offerOptionId: OfferOptionId;
142
+ /** Current processing status. */
143
+ status: ParticipationStatus;
144
+ /** Raw participation amount from API. */
145
+ amount: string;
146
+ /** Human-readable formatted amount from API. */
147
+ displayAmount: string;
148
+ /** Asset metadata for the participation amount. */
149
+ asset: Asset;
150
+ /** Funding chain identifier. */
151
+ chain: Blockchain;
152
+ /** Creation timestamp, if returned by API. */
153
+ insertedAt: Date | null;
154
+ /** Last update timestamp, if returned by API. */
155
+ updatedAt: Date | null;
156
+ /** Wallet used for participation, blank values normalized to null. */
157
+ walletAddress: WalletAddress | null;
158
+ };
159
+ declare const Participation: {
160
+ /** Maps API DTO shape into the SDK participation domain model. */
161
+ fromDto: (dto: ParticipationDto) => Participation;
162
+ };
163
+ /** Parameters required to create a new participation. */
164
+ type CreateParticipationParams = {
165
+ /** Offer to participate in. */
166
+ offerId: OfferId;
167
+ /** Offer option selected for participation. */
168
+ offerOptionId: OfferOptionId;
169
+ /** Blockchain for funding. */
170
+ chain: Blockchain;
171
+ /** Wallet address that funds the participation. */
172
+ walletAddress: WalletAddress;
173
+ /** Raw amount to participate with. */
174
+ amount: string;
175
+ /** Funding asset id. */
176
+ assetId: AssetId;
177
+ /** Optional approval transaction hash, if applicable. */
178
+ approvalTransactionHash?: string | null;
179
+ };
180
+ declare const CreateParticipationParams: {
181
+ /** Maps participation creation params into API DTO payload. */
182
+ toDto: (params: CreateParticipationParams) => CreateParticipationDto;
183
+ };
184
+
185
+ export { AuthorizationCode as A, Blockchain as B, ClientId as C, type OAuthAccessToken as O, PaginatedResponse as P, RedirectUri as R, WalletAddress as W, ClientSecret as a, CodeChallenge as b, CodeVerifier as c, CreateParticipationParams as d, Cursor as e, OAuthRefreshToken as f, OAuthSession as g, type PaginatedResponseDto as h, PaginationParams as i, Participation as j, ParticipationId as k, type ParticipationStatus as l, ParticipationsPaginationParams as m, fetchAllPages as n, type Config as o };
@@ -0,0 +1,205 @@
1
+ declare const __brand: unique symbol;
2
+ type Newtype<Base, Branding> = Base & {
3
+ readonly [__brand]: Branding;
4
+ };
5
+
6
+ type OfferDto = {
7
+ id: string;
8
+ slug: string;
9
+ tagline: string | null | undefined;
10
+ banner_url: string | null | undefined;
11
+ logo_url: string | null | undefined;
12
+ starts_at: string;
13
+ ends_at: string;
14
+ };
15
+
16
+ type OfferId = Newtype<string, 'OfferId'>;
17
+ declare const OfferId: (value: string) => OfferId;
18
+ type OfferSlug = Newtype<string, 'OfferSlug'>;
19
+ declare const OfferSlug: (value: string) => OfferSlug;
20
+ type Offer = {
21
+ id: OfferId;
22
+ slug: OfferSlug;
23
+ tagline: string | null;
24
+ bannerUrl: string | null;
25
+ logoUrl: string | null;
26
+ startsAt: Date;
27
+ endsAt: Date;
28
+ };
29
+ declare const Offer: {
30
+ fromDto: (dto: OfferDto) => Offer;
31
+ };
32
+
33
+ type AssetDto = {
34
+ code: string;
35
+ fractional_digits: number;
36
+ id: string;
37
+ name: string;
38
+ };
39
+
40
+ type AssetId = Newtype<string, 'AssetId'>;
41
+ declare const AssetId: (value: string) => AssetId;
42
+ type AssetCode = Newtype<string, 'AssetCode'>;
43
+ declare const AssetCode: (value: string) => AssetCode;
44
+ type Asset = {
45
+ id: AssetId;
46
+ code: AssetCode;
47
+ name: string;
48
+ fractionalDigits: number;
49
+ };
50
+ declare const Asset: {
51
+ fromDto: (dto: AssetDto) => Asset;
52
+ };
53
+
54
+ type OfferDetailDto = {
55
+ asset: AssetDto;
56
+ faqs: OfferDetailFaqDto[];
57
+ funding_assets: AssetDto[];
58
+ id: string;
59
+ links: OfferDetailLinkDto[];
60
+ milestones: OfferDetailMilestoneDto[];
61
+ name: string;
62
+ object: 'offer_details';
63
+ options: OfferDetailOptionDto[];
64
+ slug: string;
65
+ terms: OfferDetailTermDto[];
66
+ about: string | null | undefined;
67
+ banner_url: string | null | undefined;
68
+ category: string | null | undefined;
69
+ ends_at: string;
70
+ logo_url: string | null | undefined;
71
+ starts_at: string;
72
+ tagline: string | null | undefined;
73
+ };
74
+ type OfferDetailFaqDto = {
75
+ answer: string | null;
76
+ question: string | null;
77
+ };
78
+ type OfferDetailLinkDto = {
79
+ label: string | null;
80
+ url: string | null;
81
+ };
82
+ type OfferDetailMilestoneDto = {
83
+ name: string | null;
84
+ schedule: string | null;
85
+ status: 'completed' | 'active' | 'upcoming';
86
+ };
87
+ type OfferDetailOptionDto = {
88
+ bid_increment: number | null;
89
+ floor_price_usd: number | null;
90
+ id: string;
91
+ minimum_purchase_usd: number | null;
92
+ price_usd: string | null;
93
+ sale_agreement_url: string | null;
94
+ slug: string;
95
+ total_token_supply: number | null;
96
+ };
97
+ type OfferDetailTermDto = {
98
+ key: string | null;
99
+ value: string | null;
100
+ };
101
+
102
+ type OfferOptionId = Newtype<string, 'OfferOptionId'>;
103
+ declare const OfferOptionId: (value: string) => OfferOptionId;
104
+ type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;
105
+ declare const OfferOptionSlug: (value: string) => OfferOptionSlug;
106
+ type OfferDetail = {
107
+ id: OfferId;
108
+ slug: OfferSlug;
109
+ name: string;
110
+ asset: Asset;
111
+ fundingAssets: Asset[];
112
+ about: string | null;
113
+ tagline: string | null;
114
+ bannerUrl: string | null;
115
+ logoUrl: string | null;
116
+ category: string | null;
117
+ startsAt: Date;
118
+ endsAt: Date;
119
+ faqs: FaqItem[];
120
+ links: Link[];
121
+ milestones: Milestone[];
122
+ options: OfferOption[];
123
+ terms: TermItem[];
124
+ };
125
+ declare const OfferDetail: {
126
+ fromDto: (dto: OfferDetailDto) => OfferDetail;
127
+ };
128
+ type OfferOption = {
129
+ id: OfferOptionId;
130
+ slug: OfferOptionSlug;
131
+ bidIncrement: number | null;
132
+ floorPriceUsd: number | null;
133
+ minimumPurchaseUsd: number | null;
134
+ priceUsd: string | null;
135
+ saleAgreementUrl: string | null;
136
+ totalTokenSupply: number | null;
137
+ };
138
+ declare const OfferOption: {
139
+ fromDto: (dto: OfferDetailOptionDto) => OfferOption;
140
+ };
141
+ type FaqItem = {
142
+ question: string | null;
143
+ answer: string | null;
144
+ };
145
+ declare const FaqItem: {
146
+ fromDto: (dto: OfferDetailFaqDto) => FaqItem;
147
+ };
148
+ type Link = {
149
+ label: string | null;
150
+ url: string | null;
151
+ };
152
+ declare const Link: {
153
+ fromDto: (dto: OfferDetailLinkDto) => Link;
154
+ };
155
+ type TermItem = {
156
+ key: string | null;
157
+ value: string | null;
158
+ };
159
+ declare const TermItem: {
160
+ fromDto: (dto: OfferDetailTermDto) => TermItem;
161
+ };
162
+ type Milestone = {
163
+ name: string | null;
164
+ schedule: string | null;
165
+ status: 'completed' | 'active' | 'upcoming';
166
+ };
167
+ declare const Milestone: {
168
+ fromDto: (dto: OfferDetailMilestoneDto) => Milestone;
169
+ };
170
+
171
+ type RequirementTypeDto = 'kyc_approved' | 'identity_verified' | 'proof_of_address' | 'source_of_funds' | 'external_wallet' | 'whitelisted_wallet' | 'jurisdiction' | 'accreditation';
172
+ type RequirementDto = {
173
+ object: 'requirement';
174
+ id: string;
175
+ type: RequirementTypeDto;
176
+ details: Record<string, unknown> | null;
177
+ };
178
+ type RequirementStatusValueDto = 'not_started' | 'in_progress' | 'action_needed' | 'completed' | 'rejected';
179
+ type RequirementStatusesDto = {
180
+ object: 'requirement_statuses';
181
+ offer_id: string;
182
+ statuses: Record<string, RequirementStatusValueDto>;
183
+ };
184
+
185
+ type RequirementId = Newtype<string, 'RequirementId'>;
186
+ declare const RequirementId: (value: string) => RequirementId;
187
+ type RequirementType = RequirementTypeDto;
188
+ type RequirementStatusValue = RequirementStatusValueDto;
189
+ type Requirement = {
190
+ id: RequirementId;
191
+ type: RequirementType;
192
+ details: Record<string, unknown> | null;
193
+ };
194
+ declare const Requirement: {
195
+ fromDto: (dto: RequirementDto) => Requirement;
196
+ };
197
+ type RequirementStatusInfo = {
198
+ id: RequirementId;
199
+ status: RequirementStatusValue;
200
+ };
201
+ declare const RequirementStatusInfo: {
202
+ fromStatusesDto: (dto: RequirementStatusesDto) => RequirementStatusInfo[];
203
+ };
204
+
205
+ export { type AssetDto as A, FaqItem as F, Link as L, Milestone as M, type Newtype as N, Offer as O, Requirement as R, TermItem as T, OfferDetail as a, OfferId as b, OfferOption as c, OfferOptionId as d, OfferOptionSlug as e, OfferSlug as f, RequirementId as g, RequirementStatusInfo as h, type RequirementStatusValue as i, type RequirementType as j, Asset as k, AssetId as l };