@evergonlabs/tmi-protocol-api 0.10.1 → 0.11.0-rc.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/dist/app.d.ts +384 -76
- package/dist/app.d.ts.map +1 -1
- package/dist/client.d.ts +408 -76
- package/dist/client.d.ts.map +1 -1
- package/dist/common/blockchain.d.ts +8700 -64
- package/dist/common/blockchain.d.ts.map +1 -1
- package/dist/common/blockchain.js +5 -1
- package/dist/common/config.d.ts +5 -0
- package/dist/common/config.d.ts.map +1 -1
- package/dist/common/config.js +5 -0
- package/dist/common/indexer/client.d.ts.map +1 -1
- package/dist/common/indexer/schemas.d.ts.map +1 -1
- package/dist/common/models/asset.d.ts +1 -1
- package/dist/common/models/base/chainId.d.ts +5 -5
- package/dist/common/models/base/chainId.d.ts.map +1 -1
- package/dist/common/models/chainId.d.ts +5 -5
- package/dist/common/models/chainId.d.ts.map +1 -1
- package/dist/common/models/transaction.d.ts +1 -1
- package/dist/fractions/index.d.ts +18 -57
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/markets/common/platform.d.ts +2 -2
- package/dist/fractions/markets/deployMarket.routes.d.ts.map +1 -0
- package/dist/fractions/{platforms → markets}/deployMarket.routes.js +16 -16
- package/dist/fractions/{platforms → markets}/deployMarket.schema.d.ts +1 -1
- package/dist/fractions/markets/deployMarket.schema.d.ts.map +1 -0
- package/dist/fractions/markets/getMarket/getMarket.d.ts +1 -1
- package/dist/fractions/markets/getMarket/index.d.ts +1 -1
- package/dist/fractions/markets/index.d.ts +1 -1
- package/dist/fractions/markets/initCompilot.routes.d.ts.map +1 -0
- package/dist/fractions/{platforms → markets}/initCompilot.routes.js +4 -5
- package/dist/fractions/platforms/index.d.ts +4 -4
- package/dist/fractions/platforms/index.d.ts.map +1 -1
- package/dist/fractions/platforms/index.js +4 -4
- package/dist/fractions/roles/grantRole.schema.d.ts +1 -1
- package/dist/fractions/sales/activityUtils.d.ts +1 -1
- package/dist/fractions/sales/approveWrapper.route.d.ts +0 -58
- package/dist/fractions/sales/approveWrapper.route.d.ts.map +1 -1
- package/dist/fractions/sales/approveWrapper.route.js +1 -59
- package/dist/fractions/sales/common/fractionsSale.d.ts +4 -4
- package/dist/fractions/sales/createFractions.schema.d.ts +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +2 -2
- package/dist/fractions/sales/getFractionSaleStatistics.route.js +1 -1
- package/dist/fractions/sales/getVaultAddress.d.ts +1 -1
- package/dist/fractions/sales/index.d.ts +6 -53
- package/dist/fractions/sales/index.d.ts.map +1 -1
- package/dist/fractions/sales/index.js +1 -3
- package/dist/fractions/sales/parseFractionsCreatedEvent.js +2 -2
- package/dist/fractions/sales/purchase.route.d.ts +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.d.ts +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.js +1 -1
- package/dist/fractions/sales/searchActivity.route.d.ts +1 -1
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts +3 -3
- package/dist/fractions/sig/getAuthData.d.ts +1 -1
- package/dist/fractions/sig/getNonce.route.d.ts +1 -1
- package/dist/fractions/statistics/index.d.ts +8 -0
- package/dist/fractions/statistics/index.d.ts.map +1 -1
- package/dist/fractions/statistics/networkStatistics.route.d.ts +8 -0
- package/dist/fractions/statistics/networkStatistics.route.d.ts.map +1 -1
- package/dist/issuance/common/factories.base.d.ts +649 -5
- package/dist/issuance/common/factories.base.d.ts.map +1 -1
- package/dist/issuance/common/factories.base.js +2 -2
- package/dist/issuance/common/factories.d.ts +1 -1
- package/dist/issuance/common/factories.d.ts.map +1 -1
- package/dist/issuance/erc1155/default/deploy.d.ts +2 -2
- package/dist/issuance/erc1155/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc1155/getMintedTokenId.d.ts +18 -0
- package/dist/issuance/erc1155/getMintedTokenId.d.ts.map +1 -0
- package/dist/issuance/erc1155/getMintedTokenId.js +81 -0
- package/dist/issuance/erc1155/index.d.ts +19 -3
- package/dist/issuance/erc1155/index.d.ts.map +1 -1
- package/dist/issuance/erc1155/index.js +3 -1
- package/dist/issuance/erc20/default/deploy.d.ts +2 -2
- package/dist/issuance/erc20/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc20/index.d.ts +2 -2
- package/dist/issuance/erc721/default/deploy.d.ts +2 -2
- package/dist/issuance/erc721/gated/deploy.d.ts +2 -2
- package/dist/issuance/erc721/getMintedTokenId.d.ts +18 -0
- package/dist/issuance/erc721/getMintedTokenId.d.ts.map +1 -0
- package/dist/issuance/erc721/getMintedTokenId.js +79 -0
- package/dist/issuance/erc721/index.d.ts +19 -3
- package/dist/issuance/erc721/index.d.ts.map +1 -1
- package/dist/issuance/erc721/index.js +3 -1
- package/dist/issuance/index.d.ts +40 -8
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/next/fractions/index.d.ts +319 -4
- package/dist/next/fractions/index.d.ts.map +1 -1
- package/dist/next/fractions/index.js +3 -1
- package/dist/next/fractions/lending/buyback/buyback.schema.d.ts +1 -1
- package/dist/next/fractions/lending/createLendingSale.d.ts +1 -1
- package/dist/next/fractions/lending/schemas.d.ts +1 -1
- package/dist/next/fractions/lending/schemas.js +1 -1
- package/dist/next/fractions/platforms/default/deployNftFractionsMarket.schema.d.ts +1 -1
- package/dist/next/fractions/platforms/default/deployNftFractionsMarket.schema.js +1 -1
- package/dist/next/fractions/platforms/gated/deployNftFractionsMarket.schema.d.ts +1 -1
- package/dist/next/fractions/platforms/gated/deployNftFractionsMarket.schema.js +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts +13 -3
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts.map +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.js +16 -8
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts +14 -11
- package/dist/next/fractions/sales/createNftFractions.schema.d.ts.map +1 -1
- package/dist/next/fractions/sales/createNftFractions.schema.js +2 -8
- package/dist/next/fractions/sales/index.d.ts +13 -3
- package/dist/next/fractions/sales/index.d.ts.map +1 -1
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.d.ts +25 -0
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/approveCampaign.routes.js +35 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.d.ts +52 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.routes.js +50 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.d.ts +43 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/createCampaign.schema.js +48 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.d.ts +39 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.routes.js +39 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.d.ts +23 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/deployMarket.schema.js +29 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.d.ts +51 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochPurchase.routes.js +74 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.d.ts +51 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/epochWithdrawal.routes.js +75 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.d.ts +19 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getCurrentEpoch.routes.js +52 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.d.ts +23 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getEpochPurchaseEvent.routes.js +67 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.d.ts +20 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getPurchasePriceForEpoch.routes.js +59 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.d.ts +21 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/getWithdrawalRequestedEvent.routes.js +63 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.d.ts +307 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/index.js +27 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.d.ts +26 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.d.ts.map +1 -0
- package/dist/next/fractions/vestingRedemptionDynamic/setEpochPrice.routes.js +41 -0
- package/dist/staking/index.d.ts +7 -7
- package/dist/staking/platforms/common/platform.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/index.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +1 -1
- package/dist/staking/platforms/index.d.ts +2 -2
- package/dist/staking/platforms/searchPlatforms/index.d.ts +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +1 -1
- package/dist/staking/pools/common/pool.d.ts +1 -1
- package/dist/staking/pools/getPool/index.d.ts +1 -1
- package/dist/staking/pools/getPool/v0/getPool.d.ts +1 -1
- package/dist/staking/pools/index.d.ts +2 -2
- package/dist/staking/pools/searchPools/index.d.ts +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +1 -1
- package/dist/staking/roles/common/roleAssignment.d.ts +1 -1
- package/dist/staking/roles/common/roleEvent.d.ts +1 -1
- package/dist/staking/roles/index.d.ts +2 -2
- package/dist/staking/roles/searchRoleEvents/index.d.ts +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +1 -1
- package/dist/staking/roles/searchRoles/index.d.ts +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +1 -1
- package/dist/staking/stakes/common/stake.d.ts +1 -1
- package/dist/staking/stakes/common/stakeEvent.d.ts +1 -1
- package/dist/staking/stakes/index.d.ts +1 -1
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +1 -1
- package/package.json +10 -10
- package/dist/fractions/platforms/deployMarket.routes.d.ts.map +0 -1
- package/dist/fractions/platforms/deployMarket.schema.d.ts.map +0 -1
- package/dist/fractions/platforms/initCompilot.routes.d.ts.map +0 -1
- /package/dist/fractions/{platforms → markets}/deployMarket.routes.d.ts +0 -0
- /package/dist/fractions/{platforms → markets}/deployMarket.schema.js +0 -0
- /package/dist/fractions/{platforms → markets}/initCompilot.routes.d.ts +0 -0
|
@@ -98,10 +98,20 @@ export declare const NextFractionsApi: import("../../common/controller.js").IApi
|
|
|
98
98
|
json: {
|
|
99
99
|
chainId: unknown;
|
|
100
100
|
market: string;
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
wrapped: ({
|
|
102
|
+
type: "ERC20";
|
|
103
|
+
address: string;
|
|
104
|
+
values: string[];
|
|
105
|
+
} | {
|
|
106
|
+
type: "ERC721";
|
|
107
|
+
address: string;
|
|
103
108
|
tokenIds: string[];
|
|
104
|
-
}
|
|
109
|
+
} | {
|
|
110
|
+
type: "ERC1155";
|
|
111
|
+
address: string;
|
|
112
|
+
tokenIds: string[];
|
|
113
|
+
values: string[];
|
|
114
|
+
})[];
|
|
105
115
|
fractions: {
|
|
106
116
|
name: string;
|
|
107
117
|
symbol: string;
|
|
@@ -352,5 +362,310 @@ export declare const NextFractionsApi: import("../../common/controller.js").IApi
|
|
|
352
362
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
353
363
|
};
|
|
354
364
|
};
|
|
355
|
-
}, "/buyback">, "/lending"
|
|
365
|
+
}, "/buyback">, "/lending"> | import("hono/types").MergeSchemaPath<import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
|
|
366
|
+
"/": {
|
|
367
|
+
$post: {
|
|
368
|
+
input: {
|
|
369
|
+
json: {
|
|
370
|
+
chainId: unknown;
|
|
371
|
+
adminAddress: string;
|
|
372
|
+
acceptedFundingTokens: string[];
|
|
373
|
+
ownerAddress?: string | undefined;
|
|
374
|
+
platformEntryFee?: {
|
|
375
|
+
collectorAddress: string;
|
|
376
|
+
basisPoints: number;
|
|
377
|
+
} | undefined;
|
|
378
|
+
platformExitFee?: {
|
|
379
|
+
collectorAddress: string;
|
|
380
|
+
basisPoints: number;
|
|
381
|
+
} | undefined;
|
|
382
|
+
receiptNft?: {
|
|
383
|
+
baseName: string;
|
|
384
|
+
baseSymbol: string;
|
|
385
|
+
} | undefined;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
output: {
|
|
389
|
+
data: `0x${string}`;
|
|
390
|
+
to: `0x${string}`;
|
|
391
|
+
details: {
|
|
392
|
+
functionName: string;
|
|
393
|
+
address: `0x${string}`;
|
|
394
|
+
abi: any[];
|
|
395
|
+
args: any[];
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
outputFormat: "json";
|
|
399
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
}, "/deployMarket"> | import("hono/types").MergeSchemaPath<{
|
|
403
|
+
"/": {
|
|
404
|
+
$post: {
|
|
405
|
+
input: {
|
|
406
|
+
json: {
|
|
407
|
+
chainId: unknown;
|
|
408
|
+
market: string;
|
|
409
|
+
nft: {
|
|
410
|
+
contractAddress: string;
|
|
411
|
+
tokenId: string;
|
|
412
|
+
};
|
|
413
|
+
fractions: {
|
|
414
|
+
name: string;
|
|
415
|
+
symbol: string;
|
|
416
|
+
};
|
|
417
|
+
refundAddress: string;
|
|
418
|
+
funding: {
|
|
419
|
+
token: string;
|
|
420
|
+
amountPerPacket: string;
|
|
421
|
+
};
|
|
422
|
+
startDate: string;
|
|
423
|
+
softCapPerPurchase: string;
|
|
424
|
+
hardCapPerAccount: string;
|
|
425
|
+
fundsReceiver: string;
|
|
426
|
+
priceSetter: string;
|
|
427
|
+
fundsProvider: string;
|
|
428
|
+
issuerEntryFee?: {
|
|
429
|
+
collectorAddress: string;
|
|
430
|
+
proportion: string;
|
|
431
|
+
} | undefined;
|
|
432
|
+
issuerExitFee?: {
|
|
433
|
+
collectorAddress: string;
|
|
434
|
+
proportion: string;
|
|
435
|
+
} | undefined;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
output: {
|
|
439
|
+
data: `0x${string}`;
|
|
440
|
+
to: `0x${string}`;
|
|
441
|
+
details: {
|
|
442
|
+
functionName: string;
|
|
443
|
+
address: `0x${string}`;
|
|
444
|
+
abi: any[];
|
|
445
|
+
args: any[];
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
outputFormat: "json";
|
|
449
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
}, "/createCampaign"> | import("hono/types").MergeSchemaPath<{
|
|
453
|
+
"/": {
|
|
454
|
+
$post: {
|
|
455
|
+
input: {
|
|
456
|
+
json: {
|
|
457
|
+
market: string;
|
|
458
|
+
campaignId: string;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
output: {
|
|
462
|
+
data: `0x${string}`;
|
|
463
|
+
to: `0x${string}`;
|
|
464
|
+
details: {
|
|
465
|
+
functionName: string;
|
|
466
|
+
address: `0x${string}`;
|
|
467
|
+
abi: any[];
|
|
468
|
+
args: any[];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
outputFormat: "json";
|
|
472
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
}, "/approveCampaign"> | import("hono/types").MergeSchemaPath<{
|
|
476
|
+
"/": {
|
|
477
|
+
$post: {
|
|
478
|
+
input: {
|
|
479
|
+
json: {
|
|
480
|
+
market: string;
|
|
481
|
+
campaignId: string;
|
|
482
|
+
price: string;
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
output: {
|
|
486
|
+
data: `0x${string}`;
|
|
487
|
+
to: `0x${string}`;
|
|
488
|
+
details: {
|
|
489
|
+
functionName: string;
|
|
490
|
+
address: `0x${string}`;
|
|
491
|
+
abi: any[];
|
|
492
|
+
args: any[];
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
outputFormat: "json";
|
|
496
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
}, "/setEpochPrice"> | import("hono/types").MergeSchemaPath<{
|
|
500
|
+
"/": {
|
|
501
|
+
$get: {
|
|
502
|
+
input: {
|
|
503
|
+
query: {
|
|
504
|
+
chainId: string | string[];
|
|
505
|
+
market: string | string[];
|
|
506
|
+
campaignId: string | string[];
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
output: {
|
|
510
|
+
currentEpoch: string;
|
|
511
|
+
};
|
|
512
|
+
outputFormat: "json";
|
|
513
|
+
status: 200;
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
}, "/getCurrentEpoch"> | import("hono/types").MergeSchemaPath<{
|
|
517
|
+
"/": {
|
|
518
|
+
$get: {
|
|
519
|
+
input: {
|
|
520
|
+
query: {
|
|
521
|
+
chainId: string | string[];
|
|
522
|
+
market: string | string[];
|
|
523
|
+
campaignId: string | string[];
|
|
524
|
+
epoch: string | string[];
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
output: {
|
|
528
|
+
price: string;
|
|
529
|
+
};
|
|
530
|
+
outputFormat: "json";
|
|
531
|
+
status: 200;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
}, "/getPurchasePriceForEpoch"> | import("hono/types").MergeSchemaPath<{
|
|
535
|
+
"/": {
|
|
536
|
+
$post: {
|
|
537
|
+
input: {
|
|
538
|
+
json: {
|
|
539
|
+
market: string;
|
|
540
|
+
campaignId: string;
|
|
541
|
+
amountToProvide: string;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
output: {
|
|
545
|
+
data: `0x${string}`;
|
|
546
|
+
to: `0x${string}`;
|
|
547
|
+
details: {
|
|
548
|
+
functionName: string;
|
|
549
|
+
address: `0x${string}`;
|
|
550
|
+
abi: any[];
|
|
551
|
+
args: any[];
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
outputFormat: "json";
|
|
555
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
}, "/purchase"> | import("hono/types").MergeSchemaPath<{
|
|
559
|
+
"/": {
|
|
560
|
+
$get: {
|
|
561
|
+
input: {
|
|
562
|
+
query: {
|
|
563
|
+
chainId: string | string[];
|
|
564
|
+
hash: string | string[];
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
output: {
|
|
568
|
+
campaignId: string;
|
|
569
|
+
nftId: string;
|
|
570
|
+
purchaser: `0x${string}`;
|
|
571
|
+
amountProvided: string;
|
|
572
|
+
amountAfterFees: string;
|
|
573
|
+
epochPurchased: string;
|
|
574
|
+
};
|
|
575
|
+
outputFormat: "json";
|
|
576
|
+
status: 200;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
}, "/getEpochPurchaseEvent"> | import("hono/types").MergeSchemaPath<{
|
|
580
|
+
"/": {
|
|
581
|
+
$post: {
|
|
582
|
+
input: {
|
|
583
|
+
json: {
|
|
584
|
+
market: string;
|
|
585
|
+
campaignId: string;
|
|
586
|
+
nftId: string;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
output: {
|
|
590
|
+
data: `0x${string}`;
|
|
591
|
+
to: `0x${string}`;
|
|
592
|
+
details: {
|
|
593
|
+
functionName: string;
|
|
594
|
+
address: `0x${string}`;
|
|
595
|
+
abi: any[];
|
|
596
|
+
args: any[];
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
outputFormat: "json";
|
|
600
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
}, "/exchangeNftForFractions"> | import("hono/types").MergeSchemaPath<{
|
|
604
|
+
"/": {
|
|
605
|
+
$post: {
|
|
606
|
+
input: {
|
|
607
|
+
json: {
|
|
608
|
+
market: string;
|
|
609
|
+
campaignId: string;
|
|
610
|
+
amountOfFractions: string;
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
output: {
|
|
614
|
+
data: `0x${string}`;
|
|
615
|
+
to: `0x${string}`;
|
|
616
|
+
details: {
|
|
617
|
+
functionName: string;
|
|
618
|
+
address: `0x${string}`;
|
|
619
|
+
abi: any[];
|
|
620
|
+
args: any[];
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
outputFormat: "json";
|
|
624
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
}, "/requestWithdrawal"> | import("hono/types").MergeSchemaPath<{
|
|
628
|
+
"/": {
|
|
629
|
+
$get: {
|
|
630
|
+
input: {
|
|
631
|
+
query: {
|
|
632
|
+
chainId: string | string[];
|
|
633
|
+
hash: string | string[];
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
output: {
|
|
637
|
+
campaignId: string;
|
|
638
|
+
nftId: string;
|
|
639
|
+
requester: `0x${string}`;
|
|
640
|
+
amountOfFractions: string;
|
|
641
|
+
};
|
|
642
|
+
outputFormat: "json";
|
|
643
|
+
status: 200;
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
}, "/getWithdrawalRequestedEvent"> | import("hono/types").MergeSchemaPath<{
|
|
647
|
+
"/": {
|
|
648
|
+
$post: {
|
|
649
|
+
input: {
|
|
650
|
+
json: {
|
|
651
|
+
market: string;
|
|
652
|
+
campaignId: string;
|
|
653
|
+
nftId: string;
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
output: {
|
|
657
|
+
data: `0x${string}`;
|
|
658
|
+
to: `0x${string}`;
|
|
659
|
+
details: {
|
|
660
|
+
functionName: string;
|
|
661
|
+
address: `0x${string}`;
|
|
662
|
+
abi: any[];
|
|
663
|
+
args: any[];
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
outputFormat: "json";
|
|
667
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
}, "/withdraw">, "/vestingRedemptionDynamic">, "/", "/">>;
|
|
356
671
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/next/fractions/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/next/fractions/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yDAU3B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { createApi } from "../../common/controller.js";
|
|
|
2
2
|
import { LendingController } from "./lending/index.js";
|
|
3
3
|
import { PlatformsController } from "./platforms/index.js";
|
|
4
4
|
import { SalesController } from "./sales/index.js";
|
|
5
|
+
import { VestingRedemptionDynamicController } from "./vestingRedemptionDynamic/index.js";
|
|
5
6
|
export const NextFractionsApi = createApi({
|
|
6
7
|
title: "Next Fraction API",
|
|
7
8
|
description: "NFT Fractions and Financing markets (next-gen SDK)",
|
|
@@ -9,5 +10,6 @@ export const NextFractionsApi = createApi({
|
|
|
9
10
|
.createApp()
|
|
10
11
|
.route("/platforms", PlatformsController.build(factory))
|
|
11
12
|
.route("/sales", SalesController.build(factory))
|
|
12
|
-
.route("/lending", LendingController.build(factory))
|
|
13
|
+
.route("/lending", LendingController.build(factory))
|
|
14
|
+
.route("/vestingRedemptionDynamic", VestingRedemptionDynamicController.build(factory)),
|
|
13
15
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const BuybackRequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 72080>[]]>>;
|
|
3
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
4
4
|
buybackPacketsAmount: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
5
5
|
market: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
6
6
|
campaignId: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
@@ -6,7 +6,7 @@ export declare const BuyBackConfigSchema: z.ZodObject<{
|
|
|
6
6
|
marginCallLimitPercentage: z.ZodNumber;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
export declare const CreateLendingFractionsRequestSchema: z.ZodObject<{
|
|
9
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 72080>[]]>>;
|
|
9
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
10
10
|
market: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
11
11
|
fractions: z.ZodObject<{
|
|
12
12
|
token: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DeployLendingMarketRequestSchema: z.ZodObject<{
|
|
3
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 72080>, z.ZodLiteral<11155111 | 31337 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 72080>[]]>>;
|
|
3
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
4
4
|
adminAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
5
5
|
ownerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
6
6
|
discount: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AddressSchema, NextFractionsChainId } from "../../../common/index.js";
|
|
3
3
|
import { Int256BigInt } from "../../../common/int256.js";
|
|
4
|
-
import { CapConfigSchema, DiscountConfigSchema, FeeConfigSchema, } from "../../../fractions/
|
|
4
|
+
import { CapConfigSchema, DiscountConfigSchema, FeeConfigSchema, } from "../../../fractions/markets/deployMarket.schema.js";
|
|
5
5
|
export const DeployLendingMarketRequestSchema = z
|
|
6
6
|
.object({
|
|
7
7
|
chainId: NextFractionsChainId,
|
|
@@ -9,7 +9,7 @@ export declare const CapConfigSchema: z.ZodObject<{
|
|
|
9
9
|
* Request schema for deploying an NFT Fractions market (non-gated)
|
|
10
10
|
*/
|
|
11
11
|
export declare const DeployNftFractionsMarketDefaultRequestSchema: z.ZodObject<{
|
|
12
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 72080>, z.ZodLiteral<11155111 | 31337 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 72080>[]]>>;
|
|
12
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
13
13
|
adminAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
14
14
|
ownerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
15
15
|
cap: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AddressSchema, NextFractionsChainId } from "../../../../common/index.js";
|
|
3
3
|
import { Int256BigInt } from "../../../../common/int256.js";
|
|
4
|
-
import { FeeConfigSchema } from "../../../../fractions/
|
|
4
|
+
import { FeeConfigSchema } from "../../../../fractions/markets/deployMarket.schema.js";
|
|
5
5
|
/**
|
|
6
6
|
* Cap configuration schema for market limits
|
|
7
7
|
*/
|
|
@@ -9,7 +9,7 @@ export declare const CapConfigSchema: z.ZodObject<{
|
|
|
9
9
|
* Request schema for deploying a gated NFT Fractions market (with ComPilot gating)
|
|
10
10
|
*/
|
|
11
11
|
export declare const DeployNftFractionsMarketGatedRequestSchema: z.ZodObject<{
|
|
12
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 72080>, z.ZodLiteral<11155111 | 31337 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 72080>[]]>>;
|
|
12
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
13
13
|
adminAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
14
14
|
ownerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
15
15
|
compilotSignerAddress: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AddressSchema, NextFractionsChainId } from "../../../../common/index.js";
|
|
3
3
|
import { Int256BigInt } from "../../../../common/int256.js";
|
|
4
|
-
import { FeeConfigSchema } from "../../../../fractions/
|
|
4
|
+
import { FeeConfigSchema } from "../../../../fractions/markets/deployMarket.schema.js";
|
|
5
5
|
/**
|
|
6
6
|
* Cap configuration schema for market limits
|
|
7
7
|
*/
|
|
@@ -8,10 +8,20 @@ export declare const CreateNftFractionsV0: import("../../../common/controller.js
|
|
|
8
8
|
json: {
|
|
9
9
|
chainId: unknown;
|
|
10
10
|
market: string;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
wrapped: ({
|
|
12
|
+
type: "ERC20";
|
|
13
|
+
address: string;
|
|
14
|
+
values: string[];
|
|
15
|
+
} | {
|
|
16
|
+
type: "ERC721";
|
|
17
|
+
address: string;
|
|
13
18
|
tokenIds: string[];
|
|
14
|
-
}
|
|
19
|
+
} | {
|
|
20
|
+
type: "ERC1155";
|
|
21
|
+
address: string;
|
|
22
|
+
tokenIds: string[];
|
|
23
|
+
values: string[];
|
|
24
|
+
})[];
|
|
15
25
|
fractions: {
|
|
16
26
|
name: string;
|
|
17
27
|
symbol: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNftFractions.routes.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/createNftFractions.routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createNftFractions.routes.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/createNftFractions.routes.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8C/B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { describeRoute } from "hono-openapi";
|
|
2
2
|
import { resolver, validator } from "hono-openapi";
|
|
3
|
-
import { buildCreateNftFractionsTx } from "@evergonlabs/tmi-protocol-fractions-sdk/next";
|
|
3
|
+
import { buildCreateNftFractionsTx, createWrappedErc20, createWrappedErc721, createWrappedErc1155, } from "@evergonlabs/tmi-protocol-fractions-sdk/next";
|
|
4
4
|
import { createController } from "../../../common/controller.js";
|
|
5
5
|
import { toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
6
6
|
import { CreateNftFractionsRequestSchema } from "./createNftFractions.schema.js";
|
|
7
7
|
const route = describeRoute({
|
|
8
8
|
summary: "Create NFT fractions",
|
|
9
|
-
description: "Returns transaction data for wrapping
|
|
10
|
-
"The
|
|
9
|
+
description: "Returns transaction data for wrapping assets and creating ERC-20 compatible fractions. " +
|
|
10
|
+
"The asset owner must first approve the wrapper to transfer the wrapped tokens.",
|
|
11
11
|
tags: ["NFT Fractions"],
|
|
12
12
|
responses: {
|
|
13
13
|
200: {
|
|
@@ -25,14 +25,12 @@ const route = describeRoute({
|
|
|
25
25
|
*/
|
|
26
26
|
export const CreateNftFractionsV0 = createController({
|
|
27
27
|
build: (factory) => factory.createApp().post("/", route, validator("json", CreateNftFractionsRequestSchema), async (c) => {
|
|
28
|
-
const { chainId, market,
|
|
28
|
+
const { chainId, market, wrapped, fractions, timeBoundary, cap, funding, amountOfPacketsPerFraction, vesting, refundAddress, } = c.req.valid("json");
|
|
29
|
+
const wrappedTokens = wrapped.map(createWrapped);
|
|
29
30
|
const tx = buildCreateNftFractionsTx({
|
|
30
31
|
chainId: chainId,
|
|
31
32
|
market: market,
|
|
32
|
-
|
|
33
|
-
contractAddress: nft.contractAddress,
|
|
34
|
-
tokenIds: nft.tokenIds,
|
|
35
|
-
},
|
|
33
|
+
wrapped: wrappedTokens,
|
|
36
34
|
fractions: {
|
|
37
35
|
name: fractions.name,
|
|
38
36
|
symbol: fractions.symbol,
|
|
@@ -57,3 +55,13 @@ export const CreateNftFractionsV0 = createController({
|
|
|
57
55
|
return c.json(toTransaction(tx));
|
|
58
56
|
}),
|
|
59
57
|
});
|
|
58
|
+
function createWrapped(token) {
|
|
59
|
+
switch (token.type) {
|
|
60
|
+
case "ERC20":
|
|
61
|
+
return createWrappedErc20(token.address, token.values[0]);
|
|
62
|
+
case "ERC721":
|
|
63
|
+
return createWrappedErc721(token.address, token.tokenIds);
|
|
64
|
+
case "ERC1155":
|
|
65
|
+
return createWrappedErc1155(token.address, token.tokenIds, token.values);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -15,13 +15,6 @@ export declare const CapitalizationSchema: z.ZodObject<{
|
|
|
15
15
|
softPerAccount: z.ZodOptional<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
16
16
|
hardPerAccount: z.ZodOptional<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
-
/**
|
|
19
|
-
* NFT details schema for ERC-721 tokens to be wrapped
|
|
20
|
-
*/
|
|
21
|
-
export declare const NftDetailsSchema: z.ZodObject<{
|
|
22
|
-
contractAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
23
|
-
tokenIds: z.ZodArray<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
18
|
/**
|
|
26
19
|
* Fraction configuration schema
|
|
27
20
|
*/
|
|
@@ -49,12 +42,22 @@ export declare const VestingSchema: z.ZodObject<{
|
|
|
49
42
|
* Request schema for creating NFT fractions
|
|
50
43
|
*/
|
|
51
44
|
export declare const CreateNftFractionsRequestSchema: z.ZodObject<{
|
|
52
|
-
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 72080>[]]>>;
|
|
45
|
+
chainId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<[z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>, ...z.ZodLiteral<1 | 11155111 | 31337 | 84532 | 72080>[]]>>;
|
|
53
46
|
market: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
wrapped: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"ERC20">;
|
|
49
|
+
address: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
50
|
+
values: z.ZodArray<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"ERC721">;
|
|
53
|
+
address: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
56
54
|
tokenIds: z.ZodArray<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
57
|
-
}, z.core.$strip
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"ERC1155">;
|
|
57
|
+
address: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
58
|
+
tokenIds: z.ZodArray<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
59
|
+
values: z.ZodArray<z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>>;
|
|
60
|
+
}, z.core.$strip>]>>;
|
|
58
61
|
fractions: z.ZodObject<{
|
|
59
62
|
name: z.ZodString;
|
|
60
63
|
symbol: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNftFractions.schema.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/createNftFractions.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"createNftFractions.schema.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/createNftFractions.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { AddressSchema, FractionsChainId } from "../../../common/index.js";
|
|
3
3
|
import { Int256BigInt } from "../../../common/int256.js";
|
|
4
4
|
import { ISODate } from "../../../common/models/base/date.js";
|
|
5
|
+
import { WrappedTokenTypeSchema } from "../../../fractions/sales/createFractions.schema.js";
|
|
5
6
|
/**
|
|
6
7
|
* Time boundary schema for sale period
|
|
7
8
|
*/
|
|
@@ -18,13 +19,6 @@ export const CapitalizationSchema = z.object({
|
|
|
18
19
|
softPerAccount: Int256BigInt(z.bigint().positive()).optional().describe("Optional soft cap per account"),
|
|
19
20
|
hardPerAccount: Int256BigInt(z.bigint().positive()).optional().describe("Optional hard cap per account"),
|
|
20
21
|
});
|
|
21
|
-
/**
|
|
22
|
-
* NFT details schema for ERC-721 tokens to be wrapped
|
|
23
|
-
*/
|
|
24
|
-
export const NftDetailsSchema = z.object({
|
|
25
|
-
contractAddress: AddressSchema.describe("ERC-721 contract address"),
|
|
26
|
-
tokenIds: z.array(Int256BigInt(z.bigint().nonnegative())).nonempty().describe("Token IDs to wrap"),
|
|
27
|
-
});
|
|
28
22
|
/**
|
|
29
23
|
* Fraction configuration schema
|
|
30
24
|
*/
|
|
@@ -55,7 +49,7 @@ export const CreateNftFractionsRequestSchema = z
|
|
|
55
49
|
.object({
|
|
56
50
|
chainId: FractionsChainId.describe("Chain ID where the market is deployed"),
|
|
57
51
|
market: AddressSchema.describe("Address of the NFT Fractions market"),
|
|
58
|
-
|
|
52
|
+
wrapped: z.array(WrappedTokenTypeSchema).nonempty().describe("Wrapped asset details to include in the sale"),
|
|
59
53
|
fractions: FractionSchema.describe("Fraction token configuration"),
|
|
60
54
|
timeBoundary: TimeBoundarySchema.describe("Purchase time window"),
|
|
61
55
|
cap: CapitalizationSchema.describe("Capitalization limits"),
|
|
@@ -31,10 +31,20 @@ export declare const SalesController: import("../../../common/controller.js").IC
|
|
|
31
31
|
json: {
|
|
32
32
|
chainId: unknown;
|
|
33
33
|
market: string;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
wrapped: ({
|
|
35
|
+
type: "ERC20";
|
|
36
|
+
address: string;
|
|
37
|
+
values: string[];
|
|
38
|
+
} | {
|
|
39
|
+
type: "ERC721";
|
|
40
|
+
address: string;
|
|
36
41
|
tokenIds: string[];
|
|
37
|
-
}
|
|
42
|
+
} | {
|
|
43
|
+
type: "ERC1155";
|
|
44
|
+
address: string;
|
|
45
|
+
tokenIds: string[];
|
|
46
|
+
values: string[];
|
|
47
|
+
})[];
|
|
38
48
|
fractions: {
|
|
39
49
|
name: string;
|
|
40
50
|
symbol: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/fractions/sales/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAO1B,CAAC"}
|