@provable-games/budokan-sdk 0.1.15 → 0.1.17
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/{client-d2NE8oS8.d.cts → client-CP4dxHGv.d.cts} +3 -0
- package/dist/{client-d2NE8oS8.d.ts → client-CP4dxHGv.d.ts} +3 -0
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +11 -5
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +11 -5
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
|
@@ -151,6 +151,9 @@ interface Prize {
|
|
|
151
151
|
tokenId: string | null;
|
|
152
152
|
distributionType: string | null;
|
|
153
153
|
distributionWeight: number | null;
|
|
154
|
+
/** Populated only when `distributionType === "custom"`. Each entry is a u16
|
|
155
|
+
* basis-point share summing to 10000, one per paid position. */
|
|
156
|
+
distributionShares: number[] | null;
|
|
154
157
|
distributionCount: number | null;
|
|
155
158
|
sponsorAddress: string;
|
|
156
159
|
}
|
|
@@ -151,6 +151,9 @@ interface Prize {
|
|
|
151
151
|
tokenId: string | null;
|
|
152
152
|
distributionType: string | null;
|
|
153
153
|
distributionWeight: number | null;
|
|
154
|
+
/** Populated only when `distributionType === "custom"`. Each entry is a u16
|
|
155
|
+
* basis-point share summing to 10000, one per paid position. */
|
|
156
|
+
distributionShares: number[] | null;
|
|
154
157
|
distributionCount: number | null;
|
|
155
158
|
sponsorAddress: string;
|
|
156
159
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -600,15 +600,15 @@ var CHAINS = {
|
|
|
600
600
|
rpcUrl: "https://api.cartridge.gg/x/starknet/mainnet/rpc/v0_10",
|
|
601
601
|
apiBaseUrl: "https://budokan-api-production.up.railway.app",
|
|
602
602
|
wsUrl: "wss://budokan-api-production.up.railway.app/ws",
|
|
603
|
-
budokanAddress: "
|
|
604
|
-
viewerAddress: "
|
|
603
|
+
budokanAddress: "0x00f4941e73cc38f67f79ae1f7cdae48f28ca5a6c0e013f6136818e777f61c6ee",
|
|
604
|
+
viewerAddress: "0x027c264f4417dfd25d0626bce7304e9b3140ab06afeaf639b2678d2a05f1beb3"
|
|
605
605
|
},
|
|
606
606
|
sepolia: {
|
|
607
607
|
rpcUrl: "https://starknet-sepolia.public.blastapi.io",
|
|
608
608
|
apiBaseUrl: "https://budokan-api-sepolia.up.railway.app",
|
|
609
609
|
wsUrl: "wss://budokan-api-sepolia.up.railway.app/ws",
|
|
610
|
-
budokanAddress: "
|
|
611
|
-
viewerAddress: "
|
|
610
|
+
budokanAddress: "0x0169083e63f3caff2c15f83eb238b1f4ab8f74903c0e6b5d433b448972c578d4",
|
|
611
|
+
viewerAddress: "0x02cc4473948170cf42c2f3abc6391fd4401650375ee8e4661b7b6966cda4f15e"
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
614
|
function getChainConfig(chain) {
|
|
@@ -1014,6 +1014,7 @@ function parsePrize(raw) {
|
|
|
1014
1014
|
let tokenId = null;
|
|
1015
1015
|
let distributionType = null;
|
|
1016
1016
|
let distributionWeight = null;
|
|
1017
|
+
let distributionShares = null;
|
|
1017
1018
|
let distributionCount = null;
|
|
1018
1019
|
let payoutPosition = 0;
|
|
1019
1020
|
if (tokenTypeData) {
|
|
@@ -1032,7 +1033,11 @@ function parsePrize(raw) {
|
|
|
1032
1033
|
if (distType) {
|
|
1033
1034
|
distributionType = distType.toLowerCase();
|
|
1034
1035
|
const distValue = distVariant[distType];
|
|
1035
|
-
|
|
1036
|
+
if (distributionType === "custom") {
|
|
1037
|
+
distributionShares = Array.isArray(distValue) ? distValue.map((v) => Number(v)) : null;
|
|
1038
|
+
} else {
|
|
1039
|
+
distributionWeight = distValue != null ? Number(distValue) : null;
|
|
1040
|
+
}
|
|
1036
1041
|
}
|
|
1037
1042
|
}
|
|
1038
1043
|
const countOption = erc20?.distribution_count;
|
|
@@ -1053,6 +1058,7 @@ function parsePrize(raw) {
|
|
|
1053
1058
|
tokenId,
|
|
1054
1059
|
distributionType,
|
|
1055
1060
|
distributionWeight,
|
|
1061
|
+
distributionShares,
|
|
1056
1062
|
distributionCount,
|
|
1057
1063
|
sponsorAddress: starknet.num.toHex(obj.sponsor_address)
|
|
1058
1064
|
};
|