@opendatalabs/vana-sdk 3.13.4-pr.186.02bd59f → 3.13.4-pr.186.5162bf3

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.
@@ -49,5 +49,5 @@ export { personalServerDataReadPath, buildPersonalServerDataReadRequest, readPer
49
49
  export { ScopeSchema, parseScope, scopeToPathSegments, scopeMatchesPattern, scopeCoveredByGrant, type Scope, type ParsedScope, } from "./protocol/scopes.js";
50
50
  export { DataFileEnvelopeSchema, createDataFileEnvelope, IngestResponseSchema, type DataFileEnvelope, type IngestResponse, } from "./protocol/data-file.js";
51
51
  export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type OwnerServerRecord, type OwnerServersResult, type GatewayGrantFee, type GatewayGrantStatus, type GatewayGrantResponse, type GrantListItem, type DataPointRecord, type DataPointListResult, type ListDataPointsOptions, type RegisterServerParams, type RegisterServerResult, type RegisterBuilderParams, type RegisterBuilderResult, type RegisterDataPointParams, type RegisterDataPointResult, type CreateGrantParams, type RevokeGrantParams, type AccessRecord, type PayForOperationParams, type PayForOperationResult, type SettleOpType, type SettleItem, type SettlePromoteResult, type SettleReconcileItem, type SettleParams, type SettleResult, type GatewayClient, } from "./protocol/gateway.js";
52
- export { createEscrowGatewayClient, genericPaymentDomain, GENERIC_PAYMENT_TYPES, ESCROW_DEPOSIT_ABI, NATIVE_ASSET_ADDRESS, type GenericPaymentMessage, type EscrowBalanceEntry, type EscrowBalanceResult, type EscrowBalanceSyncResult, type DepositSubmissionResult, type PaymentBreakdown, type EscrowPayResult, EscrowWithdrawalLifecycleError, EscrowWithdrawalRejectionError, type EscrowPaymentClient, type EscrowWithdrawalFailureResult, type EscrowWithdrawalRejectedResult, type EscrowWithdrawalRejectionCode, type EscrowWithdrawalSubmittedResult, type EscrowWithdrawalSubmittedWithoutTransaction, type EscrowWithdrawalSubmittedWithTransaction, type EscrowWithdrawalSettledResult, type EscrowWithdrawalResult, type SubmitDepositParams, type PayForOpParams, type WithdrawFromEscrowParams, type EscrowGatewayClient, type SubmittedDepositEntry, type FinalizedDepositEntry, type FailedDepositEntry, } from "./protocol/escrow.js";
52
+ export { createEscrowGatewayClient, genericPaymentDomain, GENERIC_PAYMENT_TYPES, ESCROW_DEPOSIT_ABI, NATIVE_ASSET_ADDRESS, type GenericPaymentMessage, type EscrowBalanceEntry, type EscrowBalanceResult, type EscrowBalanceSyncResult, type DepositSubmissionResult, type PaymentBreakdown, type EscrowPayResult, EscrowWithdrawalLifecycleError, type EscrowPaymentClient, type EscrowWithdrawalFailureResult, type EscrowWithdrawalSubmittedResult, type EscrowWithdrawalSubmittedWithoutTransaction, type EscrowWithdrawalSubmittedWithTransaction, type EscrowWithdrawalSettledResult, type EscrowWithdrawalResult, type SubmitDepositParams, type PayForOpParams, type WithdrawFromEscrowParams, type EscrowGatewayClient, type SubmittedDepositEntry, type FinalizedDepositEntry, type FailedDepositEntry, } from "./protocol/escrow.js";
53
53
  export { PSError, parsePSError, type PSErrorCode } from "./types/ps-errors.js";
@@ -33318,16 +33318,6 @@ var EscrowWithdrawalLifecycleError = class extends Error {
33318
33318
  result;
33319
33319
  name = "EscrowWithdrawalLifecycleError";
33320
33320
  };
33321
- var EscrowWithdrawalRejectionError = class extends Error {
33322
- constructor(httpStatus, result) {
33323
- super(result.error);
33324
- this.httpStatus = httpStatus;
33325
- this.result = result;
33326
- }
33327
- httpStatus;
33328
- result;
33329
- name = "EscrowWithdrawalRejectionError";
33330
- };
33331
33321
  function createEscrowGatewayClient(baseUrl) {
33332
33322
  const base = baseUrl.replace(/\/+$/, "");
33333
33323
  async function throwOnError(res, context) {
@@ -33356,9 +33346,6 @@ function createEscrowGatewayClient(baseUrl) {
33356
33346
  if (isEscrowWithdrawalFailureResult(body)) {
33357
33347
  throw new EscrowWithdrawalLifecycleError(res.status, body);
33358
33348
  }
33359
- if (isEscrowWithdrawalRejectedResult(body)) {
33360
- throw new EscrowWithdrawalRejectionError(res.status, body);
33361
- }
33362
33349
  const error = getGatewayErrorMessage(body);
33363
33350
  throw new Error(
33364
33351
  `Escrow gateway error (POST /v1/escrow/withdraw): ${res.status} ${res.statusText}${error ? `: ${error}` : ""}`
@@ -33458,17 +33445,6 @@ function isEscrowWithdrawalFailureResult(body) {
33458
33445
  const value = body;
33459
33446
  return value.success === false && (value.status === "retryable" || value.status === "reorged" || value.status === "failed") && typeof value.error === "string" && isAddressHex(value.account) && isAddressHex(value.asset) && isUint256Decimal(value.amount) && isUint256Decimal(value.withdrawNonce) && isUint256Decimal(value.deadline) && (isHash(value.txHash) || value.txHash === null) && (!("blockNumber" in value) || isBlockNumber(value.blockNumber));
33460
33447
  }
33461
- function isEscrowWithdrawalRejectedResult(body) {
33462
- if (typeof body !== "object" || body === null) return false;
33463
- const value = body;
33464
- return value.success === false && value.status === "rejected" && isWithdrawalRejectionCode(value.code) && typeof value.error === "string" && isAddressHex(value.account) && isAddressHex(value.asset) && isUint256Decimal(value.amount) && isUint256Decimal(value.withdrawNonce) && isUint256Decimal(value.deadline) && optionalUint256Decimal(value.balance) && optionalUint256Decimal(value.authorizedAmount) && optionalUint256Decimal(value.withdrawingAmount) && optionalUint256Decimal(value.availableAmount) && optionalUint256Decimal(value.requestedAmount) && optionalUint256Decimal(value.minimumAmount);
33465
- }
33466
- function isWithdrawalRejectionCode(value) {
33467
- return value === "below_minimum" || value === "deadline_too_far" || value === "expired" || value === "insufficient_available" || value === "stale_nonce";
33468
- }
33469
- function optionalUint256Decimal(value) {
33470
- return value === void 0 || isUint256Decimal(value);
33471
- }
33472
33448
  function isAddressHex(value) {
33473
33449
  return typeof value === "string" && isHex(value, { strict: true }) && value.length === 42;
33474
33450
  }
@@ -33568,7 +33544,6 @@ export {
33568
33544
  ECIESError,
33569
33545
  ESCROW_DEPOSIT_ABI2 as ESCROW_DEPOSIT_ABI,
33570
33546
  EscrowWithdrawalLifecycleError,
33571
- EscrowWithdrawalRejectionError,
33572
33547
  ExpiredTokenError,
33573
33548
  FEE_REGISTRY_ABI,
33574
33549
  GENERIC_PAYMENT_TYPES,