@byreal-io/byreal-cli-realclaw 0.5.1-beta.0 → 0.5.1-beta.1
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/index.cjs +34 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3573,7 +3573,7 @@ var INJECTED_VERSION, VERSION, CLI_NAME, NPM_PACKAGE, API_BASE_URL, API_ENDPOINT
|
|
|
3573
3573
|
var init_constants = __esm({
|
|
3574
3574
|
"src/core/constants.ts"() {
|
|
3575
3575
|
"use strict";
|
|
3576
|
-
INJECTED_VERSION = true ? "0.5.1-beta.
|
|
3576
|
+
INJECTED_VERSION = true ? "0.5.1-beta.1" : void 0;
|
|
3577
3577
|
VERSION = INJECTED_VERSION ?? process.env.npm_package_version ?? "0.0.0";
|
|
3578
3578
|
CLI_NAME = "byreal-cli";
|
|
3579
3579
|
NPM_PACKAGE = "@byreal-io/byreal-cli-realclaw";
|
|
@@ -3636,7 +3636,7 @@ var init_constants = __esm({
|
|
|
3636
3636
|
PRIVY_STRATEGY_NAME = "Byreal CLI";
|
|
3637
3637
|
POLYGON_MAINNET_CAIP2 = "eip155:137";
|
|
3638
3638
|
SIGN_EVM_TYPED_DATA_PATH = "/sign/evm-typed-data";
|
|
3639
|
-
PM_GATEWAY_HOST_DEFAULT =
|
|
3639
|
+
PM_GATEWAY_HOST_DEFAULT = "https://api2.byreal.io";
|
|
3640
3640
|
PM_GATEWAY_BASE_PATH = "/byreal/api/gw/pm";
|
|
3641
3641
|
DEFAULTS = {
|
|
3642
3642
|
OUTPUT_FORMAT: "table",
|
|
@@ -95078,10 +95078,18 @@ init_errors2();
|
|
|
95078
95078
|
|
|
95079
95079
|
// src/plugins/polymarket/api/gateway.ts
|
|
95080
95080
|
init_constants();
|
|
95081
|
+
init_config2();
|
|
95081
95082
|
init_types2();
|
|
95082
95083
|
init_errors2();
|
|
95084
|
+
function pickGatewayHost(envHost, configBaseUrl) {
|
|
95085
|
+
const raw = envHost?.trim() || configBaseUrl?.trim() || PM_GATEWAY_HOST_DEFAULT;
|
|
95086
|
+
return raw.replace(/\/+$/, "");
|
|
95087
|
+
}
|
|
95088
|
+
function resolvePmGatewayHost() {
|
|
95089
|
+
return pickGatewayHost(process.env.PM_GATEWAY_HOST, loadRealclawConfig()?.baseUrl);
|
|
95090
|
+
}
|
|
95083
95091
|
function buildUrl(base, path4, params, host) {
|
|
95084
|
-
const root2 = `${host ??
|
|
95092
|
+
const root2 = `${host ?? resolvePmGatewayHost()}${PM_GATEWAY_BASE_PATH}/${base}${path4}`;
|
|
95085
95093
|
if (!params) return root2;
|
|
95086
95094
|
const sp = new URLSearchParams();
|
|
95087
95095
|
for (const [k, v] of Object.entries(params)) {
|
|
@@ -96383,6 +96391,24 @@ async function submitWithdraw(body, auth) {
|
|
|
96383
96391
|
return unwrapBusiness(r.value);
|
|
96384
96392
|
}
|
|
96385
96393
|
|
|
96394
|
+
// src/plugins/polymarket/banner.ts
|
|
96395
|
+
init_source();
|
|
96396
|
+
function printPmOrderSubmitBanner() {
|
|
96397
|
+
console.error(source_default.green.bold("\n[POLYMARKET] Signing order via Privy, then submitting through the Byreal gateway/CLOB\n"));
|
|
96398
|
+
}
|
|
96399
|
+
function printPmDepositSubmitBanner() {
|
|
96400
|
+
console.error(source_default.green.bold("\n[POLYMARKET] Signing Solana transfer via Privy, then submitting bridge order through the Byreal gateway\n"));
|
|
96401
|
+
}
|
|
96402
|
+
function printPmWithdrawSubmitBanner() {
|
|
96403
|
+
console.error(source_default.green.bold("\n[POLYMARKET] Submitting withdraw through the Byreal gateway (server-side Privy signing + relayer)\n"));
|
|
96404
|
+
}
|
|
96405
|
+
function printPmDeploySubmitBanner() {
|
|
96406
|
+
console.error(source_default.green.bold("\n[POLYMARKET] Submitting account deploy through the Byreal gateway (Privy signing + relayer)\n"));
|
|
96407
|
+
}
|
|
96408
|
+
function printPmCancelSubmitBanner() {
|
|
96409
|
+
console.error(source_default.green.bold("\n[POLYMARKET] Submitting cancel request through the Byreal gateway/CLOB\n"));
|
|
96410
|
+
}
|
|
96411
|
+
|
|
96386
96412
|
// src/plugins/polymarket/lib/deposit-tx.ts
|
|
96387
96413
|
var import_web3204 = __toESM(require_index_cjs(), 1);
|
|
96388
96414
|
init_esm3();
|
|
@@ -96621,7 +96647,7 @@ function createFundingCommand() {
|
|
|
96621
96647
|
);
|
|
96622
96648
|
return;
|
|
96623
96649
|
}
|
|
96624
|
-
|
|
96650
|
+
printPmDepositSubmitBanner();
|
|
96625
96651
|
let evmAuth;
|
|
96626
96652
|
try {
|
|
96627
96653
|
const evmCtx = requireEvmPrivyContext(options.evmWalletAddress);
|
|
@@ -96747,7 +96773,7 @@ function createFundingCommand() {
|
|
|
96747
96773
|
outputPmError(output2, e);
|
|
96748
96774
|
return;
|
|
96749
96775
|
}
|
|
96750
|
-
|
|
96776
|
+
printPmWithdrawSubmitBanner();
|
|
96751
96777
|
const subR = await submitWithdraw(submitBody, evmAuth);
|
|
96752
96778
|
if (!subR.ok) {
|
|
96753
96779
|
const e = /40902|privy auth/i.test(subR.error.message) ? sourceUnavailableError(
|
|
@@ -97478,7 +97504,7 @@ function createOrderCommand() {
|
|
|
97478
97504
|
);
|
|
97479
97505
|
return;
|
|
97480
97506
|
}
|
|
97481
|
-
|
|
97507
|
+
printPmOrderSubmitBanner();
|
|
97482
97508
|
const rr = await gatherReadiness({
|
|
97483
97509
|
auth,
|
|
97484
97510
|
tokenId: options.tokenId,
|
|
@@ -97571,7 +97597,7 @@ function createOrderCommand() {
|
|
|
97571
97597
|
);
|
|
97572
97598
|
return;
|
|
97573
97599
|
}
|
|
97574
|
-
|
|
97600
|
+
printPmCancelSubmitBanner();
|
|
97575
97601
|
if (targets.length === 0) {
|
|
97576
97602
|
outputPmError(output2, validationError("no matching open orders to cancel", "order-id"));
|
|
97577
97603
|
}
|
|
@@ -97603,7 +97629,6 @@ function createOrderCommand() {
|
|
|
97603
97629
|
init_esm();
|
|
97604
97630
|
init_errors2();
|
|
97605
97631
|
init_formatters();
|
|
97606
|
-
init_confirm();
|
|
97607
97632
|
init_execute();
|
|
97608
97633
|
function createAccountCommand() {
|
|
97609
97634
|
const cmd = new Command("account").description("Polymarket account readiness (Phase B)");
|
|
@@ -97657,7 +97682,7 @@ function createAccountCommand() {
|
|
|
97657
97682
|
);
|
|
97658
97683
|
return;
|
|
97659
97684
|
}
|
|
97660
|
-
|
|
97685
|
+
printPmDeploySubmitBanner();
|
|
97661
97686
|
let auth;
|
|
97662
97687
|
try {
|
|
97663
97688
|
const ctx = requireEvmPrivyContext(options.evmWalletAddress);
|