@fractalshq/sync 0.0.8 → 0.0.9
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/dist/api-TpbZ0RHC.d.mts +203 -0
- package/dist/api-TpbZ0RHC.d.ts +203 -0
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +8 -6
- package/dist/react/index.mjs +8 -6
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
type DistributionStatus = "draft" | "committed" | "clawed_back" | "hidden";
|
|
2
|
+
interface Distribution {
|
|
3
|
+
id: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
mint: string;
|
|
6
|
+
status: DistributionStatus;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt?: string;
|
|
9
|
+
totalUnlocked?: string;
|
|
10
|
+
totalLocked?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ClaimAllocation {
|
|
13
|
+
distributorId: string;
|
|
14
|
+
claimant: string;
|
|
15
|
+
amountUnlocked: string;
|
|
16
|
+
amountLocked?: string;
|
|
17
|
+
proof?: string[];
|
|
18
|
+
idx?: number;
|
|
19
|
+
}
|
|
20
|
+
interface ClaimTransactionInstruction {
|
|
21
|
+
programId: string;
|
|
22
|
+
keys: Array<{
|
|
23
|
+
pubkey: string;
|
|
24
|
+
isSigner: boolean;
|
|
25
|
+
isWritable: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
data: string;
|
|
28
|
+
}
|
|
29
|
+
interface ClaimTransactionRequest {
|
|
30
|
+
distributionId: string;
|
|
31
|
+
claimant: string;
|
|
32
|
+
index?: number;
|
|
33
|
+
proof?: string[];
|
|
34
|
+
unlockedAmount?: number;
|
|
35
|
+
lockedAmount?: number;
|
|
36
|
+
mint?: string;
|
|
37
|
+
distributorPda?: string;
|
|
38
|
+
rpcEndpoint?: string;
|
|
39
|
+
}
|
|
40
|
+
interface ClaimTransactionResponse {
|
|
41
|
+
label: string;
|
|
42
|
+
instructions: ClaimTransactionInstruction[];
|
|
43
|
+
transaction?: string;
|
|
44
|
+
}
|
|
45
|
+
interface ClaimCommitRequest {
|
|
46
|
+
distributionId: string;
|
|
47
|
+
signature: string;
|
|
48
|
+
}
|
|
49
|
+
interface ClaimableDistribution {
|
|
50
|
+
distributorId: string;
|
|
51
|
+
distributorName?: string;
|
|
52
|
+
tokenMint: string;
|
|
53
|
+
tokenSymbol?: string;
|
|
54
|
+
owedAmount: string;
|
|
55
|
+
status: "claimable" | "vesting" | "locked";
|
|
56
|
+
fees?: {
|
|
57
|
+
fixedFee?: string;
|
|
58
|
+
solFee?: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type Fetcher = typeof fetch;
|
|
63
|
+
declare const DEFAULT_BASE_PATH: string;
|
|
64
|
+
interface SyncRequestOptions {
|
|
65
|
+
basePath?: string;
|
|
66
|
+
fetcher?: Fetcher;
|
|
67
|
+
}
|
|
68
|
+
interface SyncRequestConfig {
|
|
69
|
+
basePath: string;
|
|
70
|
+
fetcher: Fetcher;
|
|
71
|
+
}
|
|
72
|
+
declare function resolveRequestConfig(options?: SyncRequestOptions): SyncRequestConfig;
|
|
73
|
+
declare class SyncReactError extends Error {
|
|
74
|
+
readonly status: number;
|
|
75
|
+
readonly code?: string | undefined;
|
|
76
|
+
readonly details?: unknown | undefined;
|
|
77
|
+
constructor(status: number, code?: string | undefined, details?: unknown | undefined);
|
|
78
|
+
}
|
|
79
|
+
declare function requestJSON<T>(config: SyncRequestConfig, path: string, init?: RequestInit): Promise<T>;
|
|
80
|
+
declare function resolveFetcher(custom?: Fetcher): Fetcher;
|
|
81
|
+
declare function sanitizeBasePath(path: string): string;
|
|
82
|
+
declare function buildUrl(basePath: string, path: string): string;
|
|
83
|
+
declare function isAbsoluteUrl(path: string): boolean;
|
|
84
|
+
declare function isRelativeUrl(path: string): boolean;
|
|
85
|
+
|
|
86
|
+
interface ListDistributionsRequest {
|
|
87
|
+
orgId?: string;
|
|
88
|
+
status?: DistributionStatus;
|
|
89
|
+
mint?: string;
|
|
90
|
+
limit?: number;
|
|
91
|
+
cursor?: string;
|
|
92
|
+
}
|
|
93
|
+
interface ListDistributionsResponse {
|
|
94
|
+
items: Distribution[];
|
|
95
|
+
nextCursor: string | null;
|
|
96
|
+
}
|
|
97
|
+
interface DistributionRecipientInput {
|
|
98
|
+
address: string;
|
|
99
|
+
amountBase: string;
|
|
100
|
+
}
|
|
101
|
+
interface DistributionInstruction {
|
|
102
|
+
programId: string;
|
|
103
|
+
keys: Array<{
|
|
104
|
+
pubkey: string;
|
|
105
|
+
isSigner: boolean;
|
|
106
|
+
isWritable: boolean;
|
|
107
|
+
}>;
|
|
108
|
+
data: string;
|
|
109
|
+
}
|
|
110
|
+
interface DistributionPersistenceWarning {
|
|
111
|
+
id?: string;
|
|
112
|
+
reason: string;
|
|
113
|
+
message: string;
|
|
114
|
+
distributionId?: string;
|
|
115
|
+
detail?: unknown;
|
|
116
|
+
exportJson?: unknown;
|
|
117
|
+
}
|
|
118
|
+
interface DistributionTransactionPayload {
|
|
119
|
+
distributionId: string;
|
|
120
|
+
label?: string;
|
|
121
|
+
instructions: DistributionInstruction[];
|
|
122
|
+
transaction?: string;
|
|
123
|
+
preview?: unknown;
|
|
124
|
+
exportJson?: unknown;
|
|
125
|
+
persistenceWarning?: DistributionPersistenceWarning;
|
|
126
|
+
title?: string | null;
|
|
127
|
+
[key: string]: unknown;
|
|
128
|
+
}
|
|
129
|
+
interface BuildDistributionTransactionRequest {
|
|
130
|
+
owner: string;
|
|
131
|
+
amountBase: string;
|
|
132
|
+
recipients: DistributionRecipientInput[];
|
|
133
|
+
mint: string;
|
|
134
|
+
distributionId?: string;
|
|
135
|
+
rpcEndpoint?: string;
|
|
136
|
+
title?: string;
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
}
|
|
139
|
+
type CreateDistributionRequest = BuildDistributionTransactionRequest;
|
|
140
|
+
type BuildDistributionTransactionResponse = DistributionTransactionPayload;
|
|
141
|
+
type CreateDistributionResponse = DistributionTransactionPayload;
|
|
142
|
+
interface CommitDistributionRequest {
|
|
143
|
+
transaction?: string;
|
|
144
|
+
signedTransactionBase64?: string;
|
|
145
|
+
signature?: string;
|
|
146
|
+
exportJson?: unknown;
|
|
147
|
+
[key: string]: unknown;
|
|
148
|
+
}
|
|
149
|
+
interface CommitDistributionResponse {
|
|
150
|
+
success: boolean;
|
|
151
|
+
distributorId: string;
|
|
152
|
+
signature?: string;
|
|
153
|
+
status?: DistributionStatus | string;
|
|
154
|
+
alreadyCommitted?: boolean;
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
interface CommitDistributionSignatureInput extends CommitDistributionRequest {
|
|
158
|
+
distributionId: string;
|
|
159
|
+
}
|
|
160
|
+
type BuildClaimTransactionRequest = ClaimTransactionRequest;
|
|
161
|
+
type BuildClaimTransactionResponse = ClaimTransactionResponse;
|
|
162
|
+
interface CommitClaimRequest {
|
|
163
|
+
distributionId: string;
|
|
164
|
+
signature?: string;
|
|
165
|
+
transaction?: string;
|
|
166
|
+
signedTransactionBase64?: string;
|
|
167
|
+
claimantPubkey?: string;
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
}
|
|
170
|
+
interface CommitClaimResponse {
|
|
171
|
+
ok: boolean;
|
|
172
|
+
}
|
|
173
|
+
interface ClaimableResponse {
|
|
174
|
+
wallet: string;
|
|
175
|
+
claimable: ClaimableDistribution[];
|
|
176
|
+
}
|
|
177
|
+
interface ClaimHistoryItem {
|
|
178
|
+
distributorId: string;
|
|
179
|
+
signature: string;
|
|
180
|
+
claimedAmount: string;
|
|
181
|
+
claimedAt: string;
|
|
182
|
+
}
|
|
183
|
+
interface ClaimHistoryResponse {
|
|
184
|
+
items: ClaimHistoryItem[];
|
|
185
|
+
nextCursor: string | null;
|
|
186
|
+
}
|
|
187
|
+
interface HealthResponse {
|
|
188
|
+
status: string;
|
|
189
|
+
timestamp: string;
|
|
190
|
+
}
|
|
191
|
+
interface PrepareDistributionDraftRequest {
|
|
192
|
+
projectId: string;
|
|
193
|
+
mint: string;
|
|
194
|
+
title?: string;
|
|
195
|
+
}
|
|
196
|
+
interface PrepareDistributionDraftResponse {
|
|
197
|
+
id: string;
|
|
198
|
+
}
|
|
199
|
+
declare function buildDistributionTransaction(input: BuildDistributionTransactionRequest, options?: SyncRequestOptions): Promise<DistributionTransactionPayload>;
|
|
200
|
+
declare function commitDistributionSignature(input: CommitDistributionSignatureInput, options?: SyncRequestOptions): Promise<CommitDistributionResponse>;
|
|
201
|
+
declare function prepareDistributionDraft(input: PrepareDistributionDraftRequest, options?: SyncRequestOptions): Promise<PrepareDistributionDraftResponse>;
|
|
202
|
+
|
|
203
|
+
export { commitDistributionSignature as A, type BuildDistributionTransactionRequest as B, type ClaimAllocation as C, type DistributionStatus as D, prepareDistributionDraft as E, type Fetcher as F, DEFAULT_BASE_PATH as G, type HealthResponse as H, type SyncRequestConfig as I, resolveRequestConfig as J, SyncReactError as K, type ListDistributionsRequest as L, requestJSON as M, resolveFetcher as N, sanitizeBasePath as O, type PrepareDistributionDraftRequest as P, buildUrl as Q, isAbsoluteUrl as R, type SyncRequestOptions as S, isRelativeUrl as T, type Distribution as a, type ClaimTransactionInstruction as b, type ClaimTransactionRequest as c, type ClaimTransactionResponse as d, type ClaimCommitRequest as e, type ClaimableDistribution as f, type ListDistributionsResponse as g, type DistributionRecipientInput as h, type DistributionInstruction as i, type DistributionPersistenceWarning as j, type DistributionTransactionPayload as k, type CreateDistributionRequest as l, type BuildDistributionTransactionResponse as m, type CreateDistributionResponse as n, type CommitDistributionRequest as o, type CommitDistributionResponse as p, type CommitDistributionSignatureInput as q, type BuildClaimTransactionRequest as r, type BuildClaimTransactionResponse as s, type CommitClaimRequest as t, type CommitClaimResponse as u, type ClaimableResponse as v, type ClaimHistoryItem as w, type ClaimHistoryResponse as x, type PrepareDistributionDraftResponse as y, buildDistributionTransaction as z };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
type DistributionStatus = "draft" | "committed" | "clawed_back" | "hidden";
|
|
2
|
+
interface Distribution {
|
|
3
|
+
id: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
mint: string;
|
|
6
|
+
status: DistributionStatus;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt?: string;
|
|
9
|
+
totalUnlocked?: string;
|
|
10
|
+
totalLocked?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ClaimAllocation {
|
|
13
|
+
distributorId: string;
|
|
14
|
+
claimant: string;
|
|
15
|
+
amountUnlocked: string;
|
|
16
|
+
amountLocked?: string;
|
|
17
|
+
proof?: string[];
|
|
18
|
+
idx?: number;
|
|
19
|
+
}
|
|
20
|
+
interface ClaimTransactionInstruction {
|
|
21
|
+
programId: string;
|
|
22
|
+
keys: Array<{
|
|
23
|
+
pubkey: string;
|
|
24
|
+
isSigner: boolean;
|
|
25
|
+
isWritable: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
data: string;
|
|
28
|
+
}
|
|
29
|
+
interface ClaimTransactionRequest {
|
|
30
|
+
distributionId: string;
|
|
31
|
+
claimant: string;
|
|
32
|
+
index?: number;
|
|
33
|
+
proof?: string[];
|
|
34
|
+
unlockedAmount?: number;
|
|
35
|
+
lockedAmount?: number;
|
|
36
|
+
mint?: string;
|
|
37
|
+
distributorPda?: string;
|
|
38
|
+
rpcEndpoint?: string;
|
|
39
|
+
}
|
|
40
|
+
interface ClaimTransactionResponse {
|
|
41
|
+
label: string;
|
|
42
|
+
instructions: ClaimTransactionInstruction[];
|
|
43
|
+
transaction?: string;
|
|
44
|
+
}
|
|
45
|
+
interface ClaimCommitRequest {
|
|
46
|
+
distributionId: string;
|
|
47
|
+
signature: string;
|
|
48
|
+
}
|
|
49
|
+
interface ClaimableDistribution {
|
|
50
|
+
distributorId: string;
|
|
51
|
+
distributorName?: string;
|
|
52
|
+
tokenMint: string;
|
|
53
|
+
tokenSymbol?: string;
|
|
54
|
+
owedAmount: string;
|
|
55
|
+
status: "claimable" | "vesting" | "locked";
|
|
56
|
+
fees?: {
|
|
57
|
+
fixedFee?: string;
|
|
58
|
+
solFee?: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type Fetcher = typeof fetch;
|
|
63
|
+
declare const DEFAULT_BASE_PATH: string;
|
|
64
|
+
interface SyncRequestOptions {
|
|
65
|
+
basePath?: string;
|
|
66
|
+
fetcher?: Fetcher;
|
|
67
|
+
}
|
|
68
|
+
interface SyncRequestConfig {
|
|
69
|
+
basePath: string;
|
|
70
|
+
fetcher: Fetcher;
|
|
71
|
+
}
|
|
72
|
+
declare function resolveRequestConfig(options?: SyncRequestOptions): SyncRequestConfig;
|
|
73
|
+
declare class SyncReactError extends Error {
|
|
74
|
+
readonly status: number;
|
|
75
|
+
readonly code?: string | undefined;
|
|
76
|
+
readonly details?: unknown | undefined;
|
|
77
|
+
constructor(status: number, code?: string | undefined, details?: unknown | undefined);
|
|
78
|
+
}
|
|
79
|
+
declare function requestJSON<T>(config: SyncRequestConfig, path: string, init?: RequestInit): Promise<T>;
|
|
80
|
+
declare function resolveFetcher(custom?: Fetcher): Fetcher;
|
|
81
|
+
declare function sanitizeBasePath(path: string): string;
|
|
82
|
+
declare function buildUrl(basePath: string, path: string): string;
|
|
83
|
+
declare function isAbsoluteUrl(path: string): boolean;
|
|
84
|
+
declare function isRelativeUrl(path: string): boolean;
|
|
85
|
+
|
|
86
|
+
interface ListDistributionsRequest {
|
|
87
|
+
orgId?: string;
|
|
88
|
+
status?: DistributionStatus;
|
|
89
|
+
mint?: string;
|
|
90
|
+
limit?: number;
|
|
91
|
+
cursor?: string;
|
|
92
|
+
}
|
|
93
|
+
interface ListDistributionsResponse {
|
|
94
|
+
items: Distribution[];
|
|
95
|
+
nextCursor: string | null;
|
|
96
|
+
}
|
|
97
|
+
interface DistributionRecipientInput {
|
|
98
|
+
address: string;
|
|
99
|
+
amountBase: string;
|
|
100
|
+
}
|
|
101
|
+
interface DistributionInstruction {
|
|
102
|
+
programId: string;
|
|
103
|
+
keys: Array<{
|
|
104
|
+
pubkey: string;
|
|
105
|
+
isSigner: boolean;
|
|
106
|
+
isWritable: boolean;
|
|
107
|
+
}>;
|
|
108
|
+
data: string;
|
|
109
|
+
}
|
|
110
|
+
interface DistributionPersistenceWarning {
|
|
111
|
+
id?: string;
|
|
112
|
+
reason: string;
|
|
113
|
+
message: string;
|
|
114
|
+
distributionId?: string;
|
|
115
|
+
detail?: unknown;
|
|
116
|
+
exportJson?: unknown;
|
|
117
|
+
}
|
|
118
|
+
interface DistributionTransactionPayload {
|
|
119
|
+
distributionId: string;
|
|
120
|
+
label?: string;
|
|
121
|
+
instructions: DistributionInstruction[];
|
|
122
|
+
transaction?: string;
|
|
123
|
+
preview?: unknown;
|
|
124
|
+
exportJson?: unknown;
|
|
125
|
+
persistenceWarning?: DistributionPersistenceWarning;
|
|
126
|
+
title?: string | null;
|
|
127
|
+
[key: string]: unknown;
|
|
128
|
+
}
|
|
129
|
+
interface BuildDistributionTransactionRequest {
|
|
130
|
+
owner: string;
|
|
131
|
+
amountBase: string;
|
|
132
|
+
recipients: DistributionRecipientInput[];
|
|
133
|
+
mint: string;
|
|
134
|
+
distributionId?: string;
|
|
135
|
+
rpcEndpoint?: string;
|
|
136
|
+
title?: string;
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
}
|
|
139
|
+
type CreateDistributionRequest = BuildDistributionTransactionRequest;
|
|
140
|
+
type BuildDistributionTransactionResponse = DistributionTransactionPayload;
|
|
141
|
+
type CreateDistributionResponse = DistributionTransactionPayload;
|
|
142
|
+
interface CommitDistributionRequest {
|
|
143
|
+
transaction?: string;
|
|
144
|
+
signedTransactionBase64?: string;
|
|
145
|
+
signature?: string;
|
|
146
|
+
exportJson?: unknown;
|
|
147
|
+
[key: string]: unknown;
|
|
148
|
+
}
|
|
149
|
+
interface CommitDistributionResponse {
|
|
150
|
+
success: boolean;
|
|
151
|
+
distributorId: string;
|
|
152
|
+
signature?: string;
|
|
153
|
+
status?: DistributionStatus | string;
|
|
154
|
+
alreadyCommitted?: boolean;
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
interface CommitDistributionSignatureInput extends CommitDistributionRequest {
|
|
158
|
+
distributionId: string;
|
|
159
|
+
}
|
|
160
|
+
type BuildClaimTransactionRequest = ClaimTransactionRequest;
|
|
161
|
+
type BuildClaimTransactionResponse = ClaimTransactionResponse;
|
|
162
|
+
interface CommitClaimRequest {
|
|
163
|
+
distributionId: string;
|
|
164
|
+
signature?: string;
|
|
165
|
+
transaction?: string;
|
|
166
|
+
signedTransactionBase64?: string;
|
|
167
|
+
claimantPubkey?: string;
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
}
|
|
170
|
+
interface CommitClaimResponse {
|
|
171
|
+
ok: boolean;
|
|
172
|
+
}
|
|
173
|
+
interface ClaimableResponse {
|
|
174
|
+
wallet: string;
|
|
175
|
+
claimable: ClaimableDistribution[];
|
|
176
|
+
}
|
|
177
|
+
interface ClaimHistoryItem {
|
|
178
|
+
distributorId: string;
|
|
179
|
+
signature: string;
|
|
180
|
+
claimedAmount: string;
|
|
181
|
+
claimedAt: string;
|
|
182
|
+
}
|
|
183
|
+
interface ClaimHistoryResponse {
|
|
184
|
+
items: ClaimHistoryItem[];
|
|
185
|
+
nextCursor: string | null;
|
|
186
|
+
}
|
|
187
|
+
interface HealthResponse {
|
|
188
|
+
status: string;
|
|
189
|
+
timestamp: string;
|
|
190
|
+
}
|
|
191
|
+
interface PrepareDistributionDraftRequest {
|
|
192
|
+
projectId: string;
|
|
193
|
+
mint: string;
|
|
194
|
+
title?: string;
|
|
195
|
+
}
|
|
196
|
+
interface PrepareDistributionDraftResponse {
|
|
197
|
+
id: string;
|
|
198
|
+
}
|
|
199
|
+
declare function buildDistributionTransaction(input: BuildDistributionTransactionRequest, options?: SyncRequestOptions): Promise<DistributionTransactionPayload>;
|
|
200
|
+
declare function commitDistributionSignature(input: CommitDistributionSignatureInput, options?: SyncRequestOptions): Promise<CommitDistributionResponse>;
|
|
201
|
+
declare function prepareDistributionDraft(input: PrepareDistributionDraftRequest, options?: SyncRequestOptions): Promise<PrepareDistributionDraftResponse>;
|
|
202
|
+
|
|
203
|
+
export { commitDistributionSignature as A, type BuildDistributionTransactionRequest as B, type ClaimAllocation as C, type DistributionStatus as D, prepareDistributionDraft as E, type Fetcher as F, DEFAULT_BASE_PATH as G, type HealthResponse as H, type SyncRequestConfig as I, resolveRequestConfig as J, SyncReactError as K, type ListDistributionsRequest as L, requestJSON as M, resolveFetcher as N, sanitizeBasePath as O, type PrepareDistributionDraftRequest as P, buildUrl as Q, isAbsoluteUrl as R, type SyncRequestOptions as S, isRelativeUrl as T, type Distribution as a, type ClaimTransactionInstruction as b, type ClaimTransactionRequest as c, type ClaimTransactionResponse as d, type ClaimCommitRequest as e, type ClaimableDistribution as f, type ListDistributionsResponse as g, type DistributionRecipientInput as h, type DistributionInstruction as i, type DistributionPersistenceWarning as j, type DistributionTransactionPayload as k, type CreateDistributionRequest as l, type BuildDistributionTransactionResponse as m, type CreateDistributionResponse as n, type CommitDistributionRequest as o, type CommitDistributionResponse as p, type CommitDistributionSignatureInput as q, type BuildClaimTransactionRequest as r, type BuildClaimTransactionResponse as s, type CommitClaimRequest as t, type CommitClaimResponse as u, type ClaimableResponse as v, type ClaimHistoryItem as w, type ClaimHistoryResponse as x, type PrepareDistributionDraftResponse as y, buildDistributionTransaction as z };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from '../api-
|
|
1
|
+
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from '../api-TpbZ0RHC.mjs';
|
|
2
2
|
|
|
3
3
|
declare const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
|
|
4
4
|
declare const XNET_2022_MINT = "xNETbUB7cRb3AAu2pNG2pUwQcJ2BHcktfvSB8x1Pq6L";
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from '../api-
|
|
1
|
+
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from '../api-TpbZ0RHC.js';
|
|
2
2
|
|
|
3
3
|
declare const MEMO_PROGRAM_ID = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
|
|
4
4
|
declare const XNET_2022_MINT = "xNETbUB7cRb3AAu2pNG2pUwQcJ2BHcktfvSB8x1Pq6L";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ApiAuthRequest, GET, POST, SyncHandlerOptions, SyncServerClient, SyncServerOptions, createMethodHandler, syncRouteHandler } from './server/index.mjs';
|
|
2
2
|
export { DEFAULT_RPC_ENDPOINT, DISTRIBUTION_MEMO_PREFIX, MEMO_PROGRAM_ID, PERSISTENCE_WARNING_EVENT, PersistenceWarningRecord, XNET_2022_MINT, assertTruthy, buildDistributionMemoTag, clearPersistenceWarning, handlePersistenceWarningResponse, loadPersistenceWarnings, recordPersistenceWarning } from './core/index.mjs';
|
|
3
|
-
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from './api-
|
|
3
|
+
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from './api-TpbZ0RHC.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ApiAuthRequest, GET, POST, SyncHandlerOptions, SyncServerClient, SyncServerOptions, createMethodHandler, syncRouteHandler } from './server/index.js';
|
|
2
2
|
export { DEFAULT_RPC_ENDPOINT, DISTRIBUTION_MEMO_PREFIX, MEMO_PROGRAM_ID, PERSISTENCE_WARNING_EVENT, PersistenceWarningRecord, XNET_2022_MINT, assertTruthy, buildDistributionMemoTag, clearPersistenceWarning, handlePersistenceWarningResponse, loadPersistenceWarnings, recordPersistenceWarning } from './core/index.js';
|
|
3
|
-
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from './api-
|
|
3
|
+
export { r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, B as BuildDistributionTransactionRequest, m as BuildDistributionTransactionResponse, C as ClaimAllocation, e as ClaimCommitRequest, w as ClaimHistoryItem, x as ClaimHistoryResponse, b as ClaimTransactionInstruction, c as ClaimTransactionRequest, d as ClaimTransactionResponse, f as ClaimableDistribution, v as ClaimableResponse, t as CommitClaimRequest, u as CommitClaimResponse, o as CommitDistributionRequest, p as CommitDistributionResponse, q as CommitDistributionSignatureInput, l as CreateDistributionRequest, n as CreateDistributionResponse, G as DEFAULT_BASE_PATH, a as Distribution, i as DistributionInstruction, j as DistributionPersistenceWarning, h as DistributionRecipientInput, D as DistributionStatus, k as DistributionTransactionPayload, F as Fetcher, H as HealthResponse, L as ListDistributionsRequest, g as ListDistributionsResponse, P as PrepareDistributionDraftRequest, y as PrepareDistributionDraftResponse, K as SyncReactError, I as SyncRequestConfig, S as SyncRequestOptions, z as buildDistributionTransaction, Q as buildUrl, A as commitDistributionSignature, R as isAbsoluteUrl, T as isRelativeUrl, E as prepareDistributionDraft, M as requestJSON, N as resolveFetcher, J as resolveRequestConfig, O as sanitizeBasePath } from './api-TpbZ0RHC.js';
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { UseQueryOptions, UseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
4
|
-
import { F as Fetcher, g as ListDistributionsResponse, K as SyncReactError, a as Distribution, B as BuildDistributionTransactionRequest, k as DistributionTransactionPayload, q as CommitDistributionSignatureInput, p as CommitDistributionResponse, v as ClaimableResponse, x as ClaimHistoryResponse, r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse } from '../api-
|
|
4
|
+
import { F as Fetcher, g as ListDistributionsResponse, K as SyncReactError, a as Distribution, B as BuildDistributionTransactionRequest, k as DistributionTransactionPayload, q as CommitDistributionSignatureInput, p as CommitDistributionResponse, v as ClaimableResponse, x as ClaimHistoryResponse, r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse } from '../api-TpbZ0RHC.mjs';
|
|
5
5
|
|
|
6
6
|
interface SyncContextValue {
|
|
7
7
|
basePath: string;
|
|
@@ -89,12 +89,12 @@ interface RecipientComposerState {
|
|
|
89
89
|
rows: RecipientComposerRow[];
|
|
90
90
|
totals: {
|
|
91
91
|
count: number;
|
|
92
|
-
|
|
92
|
+
totalAmountUi: number;
|
|
93
93
|
normalized: Array<{
|
|
94
94
|
id: string;
|
|
95
95
|
address: string;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
amountUi: number;
|
|
97
|
+
amountRaw: string;
|
|
98
98
|
}>;
|
|
99
99
|
};
|
|
100
100
|
}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { UseQueryOptions, UseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
4
|
-
import { F as Fetcher, g as ListDistributionsResponse, K as SyncReactError, a as Distribution, B as BuildDistributionTransactionRequest, k as DistributionTransactionPayload, q as CommitDistributionSignatureInput, p as CommitDistributionResponse, v as ClaimableResponse, x as ClaimHistoryResponse, r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse } from '../api-
|
|
4
|
+
import { F as Fetcher, g as ListDistributionsResponse, K as SyncReactError, a as Distribution, B as BuildDistributionTransactionRequest, k as DistributionTransactionPayload, q as CommitDistributionSignatureInput, p as CommitDistributionResponse, v as ClaimableResponse, x as ClaimHistoryResponse, r as BuildClaimTransactionRequest, s as BuildClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse } from '../api-TpbZ0RHC.js';
|
|
5
5
|
|
|
6
6
|
interface SyncContextValue {
|
|
7
7
|
basePath: string;
|
|
@@ -89,12 +89,12 @@ interface RecipientComposerState {
|
|
|
89
89
|
rows: RecipientComposerRow[];
|
|
90
90
|
totals: {
|
|
91
91
|
count: number;
|
|
92
|
-
|
|
92
|
+
totalAmountUi: number;
|
|
93
93
|
normalized: Array<{
|
|
94
94
|
id: string;
|
|
95
95
|
address: string;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
amountUi: number;
|
|
97
|
+
amountRaw: string;
|
|
98
98
|
}>;
|
|
99
99
|
};
|
|
100
100
|
}
|
package/dist/react/index.js
CHANGED
|
@@ -512,15 +512,17 @@ function useRecipientComposer(initial = []) {
|
|
|
512
512
|
setRows([hydrateRecipientRow()]);
|
|
513
513
|
}, []);
|
|
514
514
|
const totals = (0, import_react.useMemo)(() => {
|
|
515
|
-
const normalized = rows.map((row) => ({
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
515
|
+
const normalized = rows.map((row) => ({
|
|
516
|
+
id: row.id,
|
|
517
|
+
address: row.address.trim(),
|
|
518
|
+
amountUi: Number(row.amount) || 0,
|
|
519
|
+
amountRaw: row.amount
|
|
519
520
|
}));
|
|
521
|
+
const totalAmountUi = normalized.reduce((sum, row) => sum + Math.max(0, row.amountUi), 0);
|
|
520
522
|
return {
|
|
521
523
|
count: rows.length,
|
|
522
|
-
|
|
523
|
-
normalized
|
|
524
|
+
totalAmountUi,
|
|
525
|
+
normalized
|
|
524
526
|
};
|
|
525
527
|
}, [rows]);
|
|
526
528
|
return {
|
package/dist/react/index.mjs
CHANGED
|
@@ -291,15 +291,17 @@ function useRecipientComposer(initial = []) {
|
|
|
291
291
|
setRows([hydrateRecipientRow()]);
|
|
292
292
|
}, []);
|
|
293
293
|
const totals = useMemo(() => {
|
|
294
|
-
const normalized = rows.map((row) => ({
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
const normalized = rows.map((row) => ({
|
|
295
|
+
id: row.id,
|
|
296
|
+
address: row.address.trim(),
|
|
297
|
+
amountUi: Number(row.amount) || 0,
|
|
298
|
+
amountRaw: row.amount
|
|
298
299
|
}));
|
|
300
|
+
const totalAmountUi = normalized.reduce((sum, row) => sum + Math.max(0, row.amountUi), 0);
|
|
299
301
|
return {
|
|
300
302
|
count: rows.length,
|
|
301
|
-
|
|
302
|
-
normalized
|
|
303
|
+
totalAmountUi,
|
|
304
|
+
normalized
|
|
303
305
|
};
|
|
304
306
|
}, [rows]);
|
|
305
307
|
return {
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as ListDistributionsRequest, g as ListDistributionsResponse, l as CreateDistributionRequest, k as DistributionTransactionPayload, o as CommitDistributionRequest, p as CommitDistributionResponse, r as BuildClaimTransactionRequest, d as ClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse, v as ClaimableResponse, a as Distribution, x as ClaimHistoryResponse, H as HealthResponse } from '../api-
|
|
1
|
+
import { L as ListDistributionsRequest, g as ListDistributionsResponse, l as CreateDistributionRequest, k as DistributionTransactionPayload, o as CommitDistributionRequest, p as CommitDistributionResponse, r as BuildClaimTransactionRequest, d as ClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse, v as ClaimableResponse, a as Distribution, x as ClaimHistoryResponse, H as HealthResponse } from '../api-TpbZ0RHC.mjs';
|
|
2
2
|
|
|
3
3
|
type QueryInit = string | URLSearchParams | Record<string, string | number | boolean | null | undefined>;
|
|
4
4
|
type HeaderInjector = () => Promise<HeadersInit> | HeadersInit;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as ListDistributionsRequest, g as ListDistributionsResponse, l as CreateDistributionRequest, k as DistributionTransactionPayload, o as CommitDistributionRequest, p as CommitDistributionResponse, r as BuildClaimTransactionRequest, d as ClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse, v as ClaimableResponse, a as Distribution, x as ClaimHistoryResponse, H as HealthResponse } from '../api-
|
|
1
|
+
import { L as ListDistributionsRequest, g as ListDistributionsResponse, l as CreateDistributionRequest, k as DistributionTransactionPayload, o as CommitDistributionRequest, p as CommitDistributionResponse, r as BuildClaimTransactionRequest, d as ClaimTransactionResponse, t as CommitClaimRequest, u as CommitClaimResponse, v as ClaimableResponse, a as Distribution, x as ClaimHistoryResponse, H as HealthResponse } from '../api-TpbZ0RHC.js';
|
|
2
2
|
|
|
3
3
|
type QueryInit = string | URLSearchParams | Record<string, string | number | boolean | null | undefined>;
|
|
4
4
|
type HeaderInjector = () => Promise<HeadersInit> | HeadersInit;
|