@coinlist-co/react 0.12.2-rc.9fb6364 → 0.12.2-rc.a59b344
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/{chunk-STAHYDLY.js → chunk-4IZ2F732.js} +2 -2
- package/dist/{chunk-BNMF2HMW.js → chunk-NBO5E2RO.js} +39 -3
- package/dist/chunk-NBO5E2RO.js.map +1 -0
- package/dist/{chunk-KRA6EM2L.js → chunk-UJYSXXJF.js} +168 -3
- package/dist/chunk-UJYSXXJF.js.map +1 -0
- package/dist/client/index.cjs +147 -49
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +92 -29
- package/dist/client/index.d.ts +92 -29
- package/dist/client/index.js +75 -15
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.cjs +70 -40
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +20 -5
- package/dist/server/index.d.ts +20 -5
- package/dist/server/index.js +7 -6
- package/dist/server/index.js.map +1 -1
- package/dist/{time-BY3apBpc.d.cts → time-CFocgYyl.d.cts} +1 -1
- package/dist/{time-B5YOQxuh.d.ts → time-DvgN98Q9.d.ts} +1 -1
- package/dist/{token-registry-snapshot-C1NxdBmF.d.ts → token-registry-snapshot-BsAfBL_b.d.ts} +9 -7
- package/dist/{token-registry-snapshot-DyjrA32p.d.cts → token-registry-snapshot-Cc_eA5zM.d.cts} +9 -7
- package/dist/{tokens-namespace-BJfFeowE.d.cts → tokens-namespace-D_XSpiS-.d.cts} +102 -19
- package/dist/{tokens-namespace-BJfFeowE.d.ts → tokens-namespace-D_XSpiS-.d.ts} +102 -19
- package/dist/universal/index.cjs +233 -37
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.d.cts +341 -6
- package/dist/universal/index.d.ts +341 -6
- package/dist/universal/index.js +18 -2
- package/package.json +1 -1
- package/dist/chunk-BNMF2HMW.js.map +0 -1
- package/dist/chunk-KRA6EM2L.js.map +0 -1
- /package/dist/{chunk-STAHYDLY.js.map → chunk-4IZ2F732.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getUUIDv4,
|
|
10
10
|
internalLogger,
|
|
11
11
|
viemChain
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NBO5E2RO.js";
|
|
13
13
|
|
|
14
14
|
// src/universal/api/nabu/config.ts
|
|
15
15
|
var NABU_BASE_URL = "https://asset.coinlist.co";
|
|
@@ -435,4 +435,4 @@ export {
|
|
|
435
435
|
SDK_LOGGER_NAME,
|
|
436
436
|
loggerOverPino
|
|
437
437
|
};
|
|
438
|
-
//# sourceMappingURL=chunk-
|
|
438
|
+
//# sourceMappingURL=chunk-4IZ2F732.js.map
|
|
@@ -623,6 +623,12 @@ function requiredDate(value, field) {
|
|
|
623
623
|
}
|
|
624
624
|
return date;
|
|
625
625
|
}
|
|
626
|
+
function dateOrNull(value, field) {
|
|
627
|
+
return value === null ? null : requiredDate(value, field);
|
|
628
|
+
}
|
|
629
|
+
function decimalOrNull(value) {
|
|
630
|
+
return value === null ? null : DecimalString(value);
|
|
631
|
+
}
|
|
626
632
|
function requiredArray(value, field) {
|
|
627
633
|
if (!Array.isArray(value)) {
|
|
628
634
|
throw new ValidationError(
|
|
@@ -638,7 +644,8 @@ var OfferSlug = (value) => value;
|
|
|
638
644
|
var OFFER_TYPES = {
|
|
639
645
|
"coinlist::token_sale": true,
|
|
640
646
|
"superstate::swap": true,
|
|
641
|
-
"ondo::swap": true
|
|
647
|
+
"ondo::swap": true,
|
|
648
|
+
"centrifuge::vault": true
|
|
642
649
|
};
|
|
643
650
|
var isOfferType = (value) => Object.keys(OFFER_TYPES).includes(value);
|
|
644
651
|
var OfferEditorial = {
|
|
@@ -680,6 +687,7 @@ var Offer = {
|
|
|
680
687
|
// on the wire: copying them would hand every consumer a `startsAt` that
|
|
681
688
|
// is 1970 for one variant and a date for the others.
|
|
682
689
|
case "ondo::swap":
|
|
690
|
+
case "centrifuge::vault":
|
|
683
691
|
return {
|
|
684
692
|
...base2,
|
|
685
693
|
type: dto.type,
|
|
@@ -732,6 +740,19 @@ var OfferSwapContract = {
|
|
|
732
740
|
address: EvmContractAddress(dto.address)
|
|
733
741
|
})
|
|
734
742
|
};
|
|
743
|
+
var OfferVaultContract = {
|
|
744
|
+
fromDto: (dto) => ({
|
|
745
|
+
chain: Chain(dto.chain),
|
|
746
|
+
address: EvmContractAddress(dto.address)
|
|
747
|
+
}),
|
|
748
|
+
/**
|
|
749
|
+
* Drops every proxy on a chain this SDK does not name, as
|
|
750
|
+
* `OfferToken.listFromDto` does: frontline publishes the full offer-token
|
|
751
|
+
* chain list, which runs ahead of {@link Chain}, and one unmodelled chain
|
|
752
|
+
* should not throw away the proxies the SDK can use.
|
|
753
|
+
*/
|
|
754
|
+
listFromDto: (dtos) => dtos.filter((dto) => isChain(dto.chain)).map(OfferVaultContract.fromDto)
|
|
755
|
+
};
|
|
735
756
|
var OfferDetail = {
|
|
736
757
|
fromDto: (dto) => {
|
|
737
758
|
const fundingAssets = requiredArray(
|
|
@@ -794,6 +815,18 @@ var OfferDetail = {
|
|
|
794
815
|
"OfferDetail.swap_contracts"
|
|
795
816
|
).map(OfferSwapContract.fromDto)
|
|
796
817
|
};
|
|
818
|
+
// No editorial, as for Ondo. `[]` is fine and a missing key is not, for
|
|
819
|
+
// the same reason as `swap_contracts`: this is the spender a user
|
|
820
|
+
// approves.
|
|
821
|
+
case "centrifuge::vault":
|
|
822
|
+
return {
|
|
823
|
+
...base2,
|
|
824
|
+
type: dto.type,
|
|
825
|
+
logoUrl: notBlankStringOrNull(dto.logo_url),
|
|
826
|
+
vaultContracts: OfferVaultContract.listFromDto(
|
|
827
|
+
requiredArray(dto.vault_contracts, "OfferDetail.vault_contracts")
|
|
828
|
+
)
|
|
829
|
+
};
|
|
797
830
|
default:
|
|
798
831
|
return unknownTypeError(dto, "OfferDetail");
|
|
799
832
|
}
|
|
@@ -1382,7 +1415,6 @@ var OndoTradingStatus = {
|
|
|
1382
1415
|
};
|
|
1383
1416
|
}
|
|
1384
1417
|
};
|
|
1385
|
-
var decimalOrNull = (value) => value === null ? null : DecimalString(value);
|
|
1386
1418
|
var OndoQuote = {
|
|
1387
1419
|
fromDto: (dto) => {
|
|
1388
1420
|
const assetDecimals = AssetDecimals(dto.asset_decimals);
|
|
@@ -3544,6 +3576,9 @@ export {
|
|
|
3544
3576
|
StablecoinSymbol,
|
|
3545
3577
|
KnownAssetSymbol,
|
|
3546
3578
|
Bps,
|
|
3579
|
+
requiredDate,
|
|
3580
|
+
dateOrNull,
|
|
3581
|
+
decimalOrNull,
|
|
3547
3582
|
OfferId,
|
|
3548
3583
|
OfferSlug,
|
|
3549
3584
|
isOfferType,
|
|
@@ -3555,6 +3590,7 @@ export {
|
|
|
3555
3590
|
OfferOptionId,
|
|
3556
3591
|
OfferOptionSlug,
|
|
3557
3592
|
OfferSwapContract,
|
|
3593
|
+
OfferVaultContract,
|
|
3558
3594
|
OfferDetail,
|
|
3559
3595
|
OfferOption,
|
|
3560
3596
|
FaqItem,
|
|
@@ -3631,4 +3667,4 @@ export {
|
|
|
3631
3667
|
OAuthRefreshToken,
|
|
3632
3668
|
OAuthSession
|
|
3633
3669
|
};
|
|
3634
|
-
//# sourceMappingURL=chunk-
|
|
3670
|
+
//# sourceMappingURL=chunk-NBO5E2RO.js.map
|