@polkadot-api/substrate-client
Advanced tools
Comparing version 0.0.1-f435b00462a9f504c81d34285e1669cc94f17008.1.0 to 0.0.1-f466ae02908a3eb95b8a14c3dab67449a6968195.1.0
@@ -1,3 +0,2 @@ | ||
import { ConnectProvider } from '@polkadot-api/json-rpc-provider'; | ||
export { ConnectProvider, Provider } from '@polkadot-api/json-rpc-provider'; | ||
import { JsonRpcProvider } from '@polkadot-api/json-rpc-provider'; | ||
@@ -217,87 +216,6 @@ interface IRpcError { | ||
interface TxValidated { | ||
type: "validated"; | ||
} | ||
interface TxBroadcasted { | ||
type: "broadcasted"; | ||
numPeers: number; | ||
} | ||
interface TxBestChainBlockIncluded { | ||
type: "bestChainBlockIncluded"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
} | null; | ||
} | ||
interface TxFinalized { | ||
type: "finalized"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
}; | ||
} | ||
interface TxInvalid { | ||
type: "invalid"; | ||
error: string; | ||
} | ||
interface TxDropped { | ||
type: "dropped"; | ||
broadcasted: boolean; | ||
error: string; | ||
} | ||
interface TxError { | ||
type: "error"; | ||
error: string; | ||
} | ||
type TxEvent = TxValidated | TxBroadcasted | TxBestChainBlockIncluded | TxFinalized | TxInvalid | TxDropped | TxError; | ||
type Transaction = (tx: string, next: (event: TxEvent) => void, error: (e: Error) => void) => UnsubscribeFn; | ||
type Transaction = (tx: string, error: (e: Error) => void) => UnsubscribeFn; | ||
interface TxValidatedRpc { | ||
event: "validated"; | ||
} | ||
interface TxBroadcastedRpc { | ||
event: "broadcasted"; | ||
numPeers: number; | ||
} | ||
interface TxBestChainBlockIncludedRpc { | ||
event: "bestChainBlockIncluded"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
} | null; | ||
} | ||
interface TxFinalizedRpc { | ||
event: "finalized"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
}; | ||
} | ||
interface TxInvalidRpc { | ||
event: "invalid"; | ||
error: string; | ||
} | ||
interface TxDroppedRpc { | ||
event: "dropped"; | ||
broadcasted: boolean; | ||
error: string; | ||
} | ||
interface TxErrorRpc { | ||
event: "error"; | ||
error: string; | ||
} | ||
type TxEventRpc = TxValidatedRpc | TxBroadcastedRpc | TxBestChainBlockIncludedRpc | TxFinalizedRpc | TxInvalidRpc | TxDroppedRpc | TxErrorRpc; | ||
declare const getTransaction: (request: ClientRequest<string, any>, rpcMethods: Promise<Set<string>> | Set<string>) => (tx: string, error: (e: Error) => void) => () => void; | ||
type ErrorEvents = TxDroppedRpc | TxInvalidRpc | TxErrorRpc; | ||
interface ITxError { | ||
type: ErrorEvents["event"]; | ||
error: string; | ||
} | ||
declare class TransactionError extends Error implements ITxError { | ||
type: "error" | "invalid" | "dropped"; | ||
error: string; | ||
constructor(e: ErrorEvents); | ||
} | ||
declare const getTransaction: (request: ClientRequest<string, TxEventRpc>) => (namespace: string, tx: string, next: (event: TxEvent) => void, error: (e: Error) => void) => () => void; | ||
interface SubstrateClient { | ||
@@ -310,4 +228,4 @@ chainHead: ChainHead; | ||
} | ||
declare const createClient: (provider: ConnectProvider) => SubstrateClient; | ||
declare const createClient: (provider: JsonRpcProvider) => SubstrateClient; | ||
export { type AbortablePromiseFn, type BestBlockChanged, type ChainHead, type Client, type ClientInnerRequest, type ClientInnerRequestCb, type ClientRequest, type ClientRequestCb, DestroyedError, DisjointError, type Finalized, type FollowEventWithRuntime, type FollowEventWithoutRuntime, type FollowInnerSubscriptionCb, type FollowResponse, type FollowSubscriptionCb, type IRpcError, type Initialized, type InitializedWithRuntime$1 as InitializedWithRuntime, type NewBlock, type NewBlockWithRuntime$1 as NewBlockWithRuntime, OperationError, OperationInaccessibleError, OperationLimitError, RpcError, type Runtime, StopError, type StorageItemInput, type StorageItemResponse, type StorageResult, type SubstrateClient, type Transaction, TransactionError, type TxBestChainBlockIncluded, type TxBroadcasted, type TxDropped, type TxError, type TxEvent, type TxFinalized, type TxInvalid, type TxValidated, type UnsubscribeFn, createClient, getChainHead, getTransaction }; | ||
export { type AbortablePromiseFn, type BestBlockChanged, type ChainHead, type Client, type ClientInnerRequest, type ClientInnerRequestCb, type ClientRequest, type ClientRequestCb, DestroyedError, DisjointError, type Finalized, type FollowEventWithRuntime, type FollowEventWithoutRuntime, type FollowInnerSubscriptionCb, type FollowResponse, type FollowSubscriptionCb, type IRpcError, type Initialized, type InitializedWithRuntime$1 as InitializedWithRuntime, type NewBlock, type NewBlockWithRuntime$1 as NewBlockWithRuntime, OperationError, OperationInaccessibleError, OperationLimitError, RpcError, type Runtime, StopError, type StorageItemInput, type StorageItemResponse, type StorageResult, type SubstrateClient, type Transaction, type UnsubscribeFn, createClient, getChainHead, getTransaction }; |
@@ -24,20 +24,2 @@ "use strict"; | ||
}; | ||
var __accessCheck = (obj, member, msg) => { | ||
if (!member.has(obj)) | ||
throw TypeError("Cannot " + msg); | ||
}; | ||
var __privateGet = (obj, member, getter) => { | ||
__accessCheck(obj, member, "read from private field"); | ||
return getter ? getter.call(obj) : member.get(obj); | ||
}; | ||
var __privateAdd = (obj, member, value) => { | ||
if (member.has(obj)) | ||
throw TypeError("Cannot add the same private member more than once"); | ||
member instanceof WeakSet ? member.add(obj) : member.set(obj, value); | ||
}; | ||
var __privateSet = (obj, member, value, setter) => { | ||
__accessCheck(obj, member, "write to private field"); | ||
setter ? setter.call(obj, value) : member.set(obj, value); | ||
return value; | ||
}; | ||
@@ -54,3 +36,2 @@ // src/index.ts | ||
StopError: () => StopError, | ||
TransactionError: () => TransactionError, | ||
createClient: () => createClient2 | ||
@@ -96,3 +77,2 @@ }); | ||
// src/internal-utils/subscriptions-manager.ts | ||
var MAX_TIME = 2e3; | ||
var getSubscriptionsManager = () => { | ||
@@ -127,207 +107,40 @@ const subscriptions = /* @__PURE__ */ new Map(); | ||
}; | ||
var _messages, _token; | ||
var OrphanMessages = class { | ||
constructor() { | ||
__privateAdd(this, _messages, void 0); | ||
__privateAdd(this, _token, void 0); | ||
__privateSet(this, _messages, /* @__PURE__ */ new Map()); | ||
__privateSet(this, _token, null); | ||
} | ||
checkClear() { | ||
if (__privateGet(this, _messages).size > 0) | ||
return; | ||
clearInterval(__privateGet(this, _token)); | ||
__privateSet(this, _token, null); | ||
} | ||
set(key, message) { | ||
const messages = __privateGet(this, _messages).get(key)?.messages ?? []; | ||
messages.push(message); | ||
__privateGet(this, _messages).set(key, { expiry: Date.now() + MAX_TIME, messages }); | ||
__privateSet(this, _token, __privateGet(this, _token) || setInterval(() => { | ||
const now = Date.now(); | ||
[...__privateGet(this, _messages).entries()].forEach(([key2, entry]) => { | ||
if (entry.expiry > now) | ||
__privateGet(this, _messages).delete(key2); | ||
}); | ||
this.checkClear(); | ||
}, MAX_TIME)); | ||
} | ||
retrieve(key) { | ||
const result = __privateGet(this, _messages).get(key); | ||
if (!result) | ||
return []; | ||
__privateGet(this, _messages).delete(key); | ||
this.checkClear(); | ||
return result.messages; | ||
} | ||
clear() { | ||
__privateGet(this, _messages).clear(); | ||
this.checkClear(); | ||
} | ||
}; | ||
_messages = new WeakMap(); | ||
_token = new WeakMap(); | ||
// src/client/RpcError.ts | ||
var RpcError = class extends Error { | ||
constructor(e) { | ||
super(e.message); | ||
__publicField(this, "code"); | ||
__publicField(this, "data"); | ||
this.code = e.code; | ||
this.data = e.data; | ||
this.name = "RpcError"; | ||
} | ||
}; | ||
// src/client/DestroyedError.ts | ||
var DestroyedError = class extends Error { | ||
constructor() { | ||
super("Client destroyed"); | ||
this.name = "DestroyedError"; | ||
} | ||
}; | ||
// src/client/createClient.ts | ||
var createClient = (gProvider) => { | ||
const responses = /* @__PURE__ */ new Map(); | ||
const subscriptions = getSubscriptionsManager(); | ||
const orphans = new OrphanMessages(); | ||
let provider = null; | ||
const send = (id, method, params) => { | ||
provider.send( | ||
JSON.stringify({ | ||
jsonrpc: "2.0", | ||
id, | ||
method, | ||
params | ||
}) | ||
); | ||
}; | ||
function onMessage(message) { | ||
try { | ||
let id, result, error, params, subscription; | ||
const parsed = JSON.parse(message); | ||
({ id, result, error, params } = parsed); | ||
if (id) { | ||
const cb = responses.get(id); | ||
if (!cb) | ||
return; | ||
responses.delete(id); | ||
return error ? cb.onError(new RpcError(error)) : cb.onSuccess(result, (methodName, opaqueId, subscriber) => { | ||
const subscriptionId2 = methodName + opaqueId; | ||
subscriptions.subscribe(subscriptionId2, subscriber); | ||
const pending = orphans.retrieve(subscriptionId2); | ||
if (pending.length) { | ||
Promise.resolve().then(() => { | ||
pending.forEach((msg) => { | ||
subscriptions.next(subscriptionId2, msg); | ||
}); | ||
}); | ||
} | ||
return () => { | ||
subscriptions.unsubscribe(subscriptionId2); | ||
}; | ||
}); | ||
} | ||
; | ||
({ subscription, result, error } = params); | ||
if (!subscription || !error && !Object.hasOwn(params, "result")) | ||
throw 0; | ||
const subscriptionId = parsed.method + subscription; | ||
if (!subscriptions.has(subscriptionId)) { | ||
orphans.set(subscriptionId, message); | ||
} | ||
if (error) { | ||
subscriptions.error(subscriptionId, new RpcError(error)); | ||
} else { | ||
subscriptions.next(subscriptionId, result); | ||
} | ||
} catch (e) { | ||
console.warn("Error parsing incomming message: " + message); | ||
console.error(e); | ||
} | ||
} | ||
provider = gProvider(onMessage); | ||
const disconnect = () => { | ||
provider?.disconnect(); | ||
provider = null; | ||
subscriptions.errorAll(new DestroyedError()); | ||
responses.forEach((r) => r.onError(new DestroyedError())); | ||
responses.clear(); | ||
orphans.clear(); | ||
}; | ||
let nextId = 1; | ||
const request = (method, params, cb) => { | ||
if (!provider) | ||
throw new Error("Not connected"); | ||
const id = nextId++; | ||
if (cb) | ||
responses.set(id, cb); | ||
send(id, method, params); | ||
return () => { | ||
responses.delete(id); | ||
}; | ||
}; | ||
return { | ||
request, | ||
disconnect | ||
}; | ||
}; | ||
// src/transaction/transaction.ts | ||
var eventToType = (input) => { | ||
const { event: type, ...rest } = input; | ||
return { type, ...rest }; | ||
var getTxBroadcastNames = (input) => { | ||
if (input.has("transaction_v1_broadcast")) | ||
return ["transaction_v1_broadcast", "transaction_v1_stop"]; | ||
if (input.has("transactionWatch_unstable_submitAndWatch")) | ||
return [ | ||
"transactionWatch_unstable_submitAndWatch", | ||
"transactionWatch_unstable_unwatch" | ||
]; | ||
return ["transaction_unstable_submitAndWatch", "transaction_unstable_unwatch"]; | ||
}; | ||
var terminalEvents = /* @__PURE__ */ new Set([ | ||
"dropped", | ||
"invalid", | ||
"finalized", | ||
"error" | ||
]); | ||
function isTerminalEvent(event) { | ||
return terminalEvents.has(event.event); | ||
} | ||
var TransactionError = class extends Error { | ||
constructor(e) { | ||
super(`TxError: ${e.event} - ${e.error}`); | ||
__publicField(this, "type"); | ||
__publicField(this, "error"); | ||
this.type = e.event; | ||
this.error = e.error; | ||
this.name = "TransactionError"; | ||
} | ||
}; | ||
var getTransaction = (request) => (namespace, tx, next, error) => { | ||
let cancel = request(namespace + "_unstable_submitAndWatch", [tx], { | ||
onSuccess: (subscriptionId, follow) => { | ||
const done = follow( | ||
namespace + "_unstable_watchEvent", | ||
subscriptionId, | ||
{ | ||
next: (event) => { | ||
if (isTerminalEvent(event)) { | ||
done(); | ||
cancel = noop2; | ||
if (event.event !== "finalized") | ||
return error(new TransactionError(event)); | ||
} | ||
next(eventToType(event)); | ||
}, | ||
error(e) { | ||
if (!(e instanceof DestroyedError)) | ||
cancel(); | ||
cancel = noop2; | ||
error(e); | ||
} | ||
} | ||
); | ||
cancel = () => { | ||
done(); | ||
request(namespace + "_unstable_unwatch", [subscriptionId]); | ||
var getTransaction = (request, rpcMethods) => (tx, error) => { | ||
const broadcast = (tx2, broadcastFn, cancelBroadcastFn) => request(broadcastFn, [tx2], { | ||
onSuccess: (subscriptionId) => { | ||
cancel = subscriptionId === null ? noop2 : () => { | ||
request(cancelBroadcastFn, [subscriptionId]); | ||
}; | ||
if (subscriptionId === null) { | ||
error( | ||
new Error("Max # of broadcasted transactions has been reached") | ||
); | ||
} | ||
}, | ||
onError: error | ||
}); | ||
let isActive = true; | ||
let cancel = () => { | ||
isActive = false; | ||
}; | ||
if (rpcMethods instanceof Promise) { | ||
rpcMethods.then(getTxBroadcastNames).then((names) => { | ||
if (!isActive) | ||
return; | ||
cancel = broadcast(tx, ...names); | ||
}); | ||
} else | ||
cancel = broadcast(tx, ...getTxBroadcastNames(rpcMethods)); | ||
return () => { | ||
@@ -518,3 +331,3 @@ cancel(); | ||
const onItems = isDescendants ? (items) => { | ||
result.push(...items); | ||
result.push(items); | ||
} : (items) => { | ||
@@ -530,3 +343,7 @@ result = items[0]?.[type]; | ||
() => { | ||
resolve(result); | ||
try { | ||
resolve(isDescendants ? result.flat() : result); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}, | ||
@@ -545,3 +362,3 @@ (nDiscarded) => { | ||
// src/chainhead/unpin.ts | ||
var createUnpinFn = (request) => (hashes) => new Promise((res, rej) => { | ||
var createUnpinFn = (request) => (hashes) => hashes.length > 0 ? new Promise((res, rej) => { | ||
request("chainHead_unstable_unpin", [hashes], { | ||
@@ -553,4 +370,12 @@ onSuccess() { | ||
}); | ||
}); | ||
}) : Promise.resolve(); | ||
// src/client/DestroyedError.ts | ||
var DestroyedError = class extends Error { | ||
constructor() { | ||
super("Client destroyed"); | ||
this.name = "DestroyedError"; | ||
} | ||
}; | ||
// src/chainhead/chainhead.ts | ||
@@ -563,3 +388,2 @@ function isOperationEvent(event) { | ||
const subscriptions = getSubscriptionsManager(); | ||
const orphans = new OrphanMessages(); | ||
const ongoingRequests = /* @__PURE__ */ new Set(); | ||
@@ -570,5 +394,4 @@ const deferredFollow = deferred(); | ||
if (isOperationEvent(event)) { | ||
if (!subscriptions.has(event.operationId)) { | ||
orphans.set(event.operationId, event); | ||
} | ||
if (!subscriptions.has(event.operationId)) | ||
console.warn("Uknown operationId on", event); | ||
return subscriptions.next(event.operationId, event); | ||
@@ -609,3 +432,2 @@ } | ||
ongoingRequests.clear(); | ||
orphans.clear(); | ||
}; | ||
@@ -647,10 +469,2 @@ followSubscription = subscriptionId; | ||
subscriptions.subscribe(operationId, subscriber); | ||
const pending = orphans.retrieve(operationId); | ||
if (pending.length) { | ||
Promise.resolve().then(() => { | ||
pending.forEach((msg) => { | ||
subscriptions.next(operationId, msg); | ||
}); | ||
}); | ||
} | ||
return () => { | ||
@@ -704,4 +518,91 @@ subscriptions.unsubscribe(operationId); | ||
// src/client/RpcError.ts | ||
var RpcError = class extends Error { | ||
constructor(e) { | ||
super(e.message); | ||
__publicField(this, "code"); | ||
__publicField(this, "data"); | ||
this.code = e.code; | ||
this.data = e.data; | ||
this.name = "RpcError"; | ||
} | ||
}; | ||
// src/client/createClient.ts | ||
var nextClientId = 1; | ||
var createClient = (gProvider) => { | ||
let clientId = nextClientId++; | ||
const responses = /* @__PURE__ */ new Map(); | ||
const subscriptions = getSubscriptionsManager(); | ||
let connection = null; | ||
const send = (id, method, params) => { | ||
connection.send( | ||
JSON.stringify({ | ||
jsonrpc: "2.0", | ||
id, | ||
method, | ||
params | ||
}) | ||
); | ||
}; | ||
function onMessage(message) { | ||
try { | ||
let id, result, error, params, subscription; | ||
const parsed = JSON.parse(message); | ||
({ id, result, error, params } = parsed); | ||
if (id) { | ||
const cb = responses.get(id); | ||
if (!cb) | ||
return; | ||
responses.delete(id); | ||
return error ? cb.onError(new RpcError(error)) : cb.onSuccess(result, (methodName, opaqueId, subscriber) => { | ||
const subscriptionId2 = methodName + opaqueId; | ||
subscriptions.subscribe(subscriptionId2, subscriber); | ||
return () => { | ||
subscriptions.unsubscribe(subscriptionId2); | ||
}; | ||
}); | ||
} | ||
; | ||
({ subscription, result, error } = params); | ||
if (!subscription || !error && !Object.hasOwn(params, "result")) | ||
throw 0; | ||
const subscriptionId = parsed.method + subscription; | ||
if (error) { | ||
subscriptions.error(subscriptionId, new RpcError(error)); | ||
} else { | ||
subscriptions.next(subscriptionId, result); | ||
} | ||
} catch (e) { | ||
console.warn("Error parsing incomming message: " + message); | ||
console.error(e); | ||
} | ||
} | ||
connection = gProvider(onMessage); | ||
const disconnect = () => { | ||
connection?.disconnect(); | ||
connection = null; | ||
subscriptions.errorAll(new DestroyedError()); | ||
responses.forEach((r) => r.onError(new DestroyedError())); | ||
responses.clear(); | ||
}; | ||
let nextId = 1; | ||
const request = (method, params, cb) => { | ||
if (!connection) | ||
throw new Error("Not connected"); | ||
const id = `${clientId}-${nextId++}`; | ||
if (cb) | ||
responses.set(id, cb); | ||
send(id, method, params); | ||
return () => { | ||
responses.delete(id); | ||
}; | ||
}; | ||
return { | ||
request, | ||
disconnect | ||
}; | ||
}; | ||
// src/index.ts | ||
var import_utils3 = require("@polkadot-api/utils"); | ||
var createClient2 = (provider) => { | ||
@@ -715,35 +616,9 @@ const client = createClient(provider); | ||
); | ||
rpcMethods.catch(import_utils3.noop); | ||
const getSubmitAndWatchNamespace = (input) => input.has("transaction_unstable_submitAndWatch") ? "transaction" : "transactionWatch"; | ||
const innerTransaction = getTransaction( | ||
client.request | ||
); | ||
rpcMethods.catch(noop2); | ||
return { | ||
chainHead: getChainHead(client.request), | ||
transaction: (tx, next, err) => { | ||
if (rpcMethods instanceof Promise) { | ||
let cleanup = import_utils3.noop; | ||
let isRunning = true; | ||
rpcMethods.then((result) => { | ||
if (!isRunning) | ||
return; | ||
cleanup = innerTransaction( | ||
getSubmitAndWatchNamespace(result), | ||
tx, | ||
next, | ||
err | ||
); | ||
}); | ||
return () => { | ||
isRunning = false; | ||
cleanup(); | ||
}; | ||
} | ||
return innerTransaction( | ||
getSubmitAndWatchNamespace(rpcMethods), | ||
tx, | ||
next, | ||
err | ||
); | ||
}, | ||
transaction: getTransaction( | ||
client.request, | ||
rpcMethods | ||
), | ||
destroy: () => { | ||
@@ -750,0 +625,0 @@ client.disconnect(); |
@@ -1,3 +0,2 @@ | ||
import { ConnectProvider } from '@polkadot-api/json-rpc-provider'; | ||
export { ConnectProvider, Provider } from '@polkadot-api/json-rpc-provider'; | ||
import { JsonRpcProvider } from '@polkadot-api/json-rpc-provider'; | ||
@@ -217,87 +216,6 @@ interface IRpcError { | ||
interface TxValidated { | ||
type: "validated"; | ||
} | ||
interface TxBroadcasted { | ||
type: "broadcasted"; | ||
numPeers: number; | ||
} | ||
interface TxBestChainBlockIncluded { | ||
type: "bestChainBlockIncluded"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
} | null; | ||
} | ||
interface TxFinalized { | ||
type: "finalized"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
}; | ||
} | ||
interface TxInvalid { | ||
type: "invalid"; | ||
error: string; | ||
} | ||
interface TxDropped { | ||
type: "dropped"; | ||
broadcasted: boolean; | ||
error: string; | ||
} | ||
interface TxError { | ||
type: "error"; | ||
error: string; | ||
} | ||
type TxEvent = TxValidated | TxBroadcasted | TxBestChainBlockIncluded | TxFinalized | TxInvalid | TxDropped | TxError; | ||
type Transaction = (tx: string, next: (event: TxEvent) => void, error: (e: Error) => void) => UnsubscribeFn; | ||
type Transaction = (tx: string, error: (e: Error) => void) => UnsubscribeFn; | ||
interface TxValidatedRpc { | ||
event: "validated"; | ||
} | ||
interface TxBroadcastedRpc { | ||
event: "broadcasted"; | ||
numPeers: number; | ||
} | ||
interface TxBestChainBlockIncludedRpc { | ||
event: "bestChainBlockIncluded"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
} | null; | ||
} | ||
interface TxFinalizedRpc { | ||
event: "finalized"; | ||
block: { | ||
hash: string; | ||
index: number; | ||
}; | ||
} | ||
interface TxInvalidRpc { | ||
event: "invalid"; | ||
error: string; | ||
} | ||
interface TxDroppedRpc { | ||
event: "dropped"; | ||
broadcasted: boolean; | ||
error: string; | ||
} | ||
interface TxErrorRpc { | ||
event: "error"; | ||
error: string; | ||
} | ||
type TxEventRpc = TxValidatedRpc | TxBroadcastedRpc | TxBestChainBlockIncludedRpc | TxFinalizedRpc | TxInvalidRpc | TxDroppedRpc | TxErrorRpc; | ||
declare const getTransaction: (request: ClientRequest<string, any>, rpcMethods: Promise<Set<string>> | Set<string>) => (tx: string, error: (e: Error) => void) => () => void; | ||
type ErrorEvents = TxDroppedRpc | TxInvalidRpc | TxErrorRpc; | ||
interface ITxError { | ||
type: ErrorEvents["event"]; | ||
error: string; | ||
} | ||
declare class TransactionError extends Error implements ITxError { | ||
type: "error" | "invalid" | "dropped"; | ||
error: string; | ||
constructor(e: ErrorEvents); | ||
} | ||
declare const getTransaction: (request: ClientRequest<string, TxEventRpc>) => (namespace: string, tx: string, next: (event: TxEvent) => void, error: (e: Error) => void) => () => void; | ||
interface SubstrateClient { | ||
@@ -310,4 +228,4 @@ chainHead: ChainHead; | ||
} | ||
declare const createClient: (provider: ConnectProvider) => SubstrateClient; | ||
declare const createClient: (provider: JsonRpcProvider) => SubstrateClient; | ||
export { type AbortablePromiseFn, type BestBlockChanged, type ChainHead, type Client, type ClientInnerRequest, type ClientInnerRequestCb, type ClientRequest, type ClientRequestCb, DestroyedError, DisjointError, type Finalized, type FollowEventWithRuntime, type FollowEventWithoutRuntime, type FollowInnerSubscriptionCb, type FollowResponse, type FollowSubscriptionCb, type IRpcError, type Initialized, type InitializedWithRuntime$1 as InitializedWithRuntime, type NewBlock, type NewBlockWithRuntime$1 as NewBlockWithRuntime, OperationError, OperationInaccessibleError, OperationLimitError, RpcError, type Runtime, StopError, type StorageItemInput, type StorageItemResponse, type StorageResult, type SubstrateClient, type Transaction, TransactionError, type TxBestChainBlockIncluded, type TxBroadcasted, type TxDropped, type TxError, type TxEvent, type TxFinalized, type TxInvalid, type TxValidated, type UnsubscribeFn, createClient, getChainHead, getTransaction }; | ||
export { type AbortablePromiseFn, type BestBlockChanged, type ChainHead, type Client, type ClientInnerRequest, type ClientInnerRequestCb, type ClientRequest, type ClientRequestCb, DestroyedError, DisjointError, type Finalized, type FollowEventWithRuntime, type FollowEventWithoutRuntime, type FollowInnerSubscriptionCb, type FollowResponse, type FollowSubscriptionCb, type IRpcError, type Initialized, type InitializedWithRuntime$1 as InitializedWithRuntime, type NewBlock, type NewBlockWithRuntime$1 as NewBlockWithRuntime, OperationError, OperationInaccessibleError, OperationLimitError, RpcError, type Runtime, StopError, type StorageItemInput, type StorageItemResponse, type StorageResult, type SubstrateClient, type Transaction, type UnsubscribeFn, createClient, getChainHead, getTransaction }; |
@@ -1,2 +0,2 @@ | ||
"use strict";var B=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var le=Object.prototype.hasOwnProperty;var ue=(r,e,t)=>e in r?B(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var me=(r,e)=>{for(var t in e)B(r,t,{get:e[t],enumerable:!0})},de=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of pe(e))!le.call(r,o)&&o!==t&&B(r,o,{get:()=>e[o],enumerable:!(n=ce(e,o))||n.enumerable});return r};var fe=r=>de(B({},"__esModule",{value:!0}),r);var P=(r,e,t)=>(ue(r,typeof e!="symbol"?e+"":e,t),t),Z=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var y=(r,e,t)=>(Z(r,e,"read from private field"),t?t.call(r):e.get(r)),$=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},W=(r,e,t,n)=>(Z(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);var ve={};me(ve,{DestroyedError:()=>v,DisjointError:()=>S,OperationError:()=>O,OperationInaccessibleError:()=>F,OperationLimitError:()=>C,RpcError:()=>_,StopError:()=>k,TransactionError:()=>M,createClient:()=>Ee});module.exports=fe(ve);var z=require("@polkadot-api/utils"),H=r=>(...e)=>new Promise((t,n)=>{let o=z.noop,[p,a]=e[e.length-1]instanceof AbortSignal?[e.slice(0,e.length-1),e[e.length-1]]:[e],d=()=>{o(),n(new z.AbortError)};a?.addEventListener("abort",d,{once:!0});let s=c=>f=>{o=z.noop,a?.removeEventListener("abort",d),c(f)};o=r(s(t),s(n),...p)});function ee(){let r=()=>{},e=()=>{};return{promise:new Promise((n,o)=>{r=n,e=o}),res:r,rej:e}}var T=()=>{};var U=()=>{let r=new Map;return{has:r.has.bind(r),subscribe(e,t){r.set(e,t)},unsubscribe(e){r.delete(e)},next(e,t){r.get(e)?.next(t)},error(e,t){let n=r.get(e);n&&(r.delete(e),n.error(t))},errorAll(e){let t=[...r.values()];r.clear(),t.forEach(n=>{n.error(e)})}}},E,w,D=class{constructor(){$(this,E,void 0);$(this,w,void 0);W(this,E,new Map),W(this,w,null)}checkClear(){y(this,E).size>0||(clearInterval(y(this,w)),W(this,w,null))}set(e,t){let n=y(this,E).get(e)?.messages??[];n.push(t),y(this,E).set(e,{expiry:Date.now()+2e3,messages:n}),W(this,w,y(this,w)||setInterval(()=>{let o=Date.now();[...y(this,E).entries()].forEach(([p,a])=>{a.expiry>o&&y(this,E).delete(p)}),this.checkClear()},2e3))}retrieve(e){let t=y(this,E).get(e);return t?(y(this,E).delete(e),this.checkClear(),t.messages):[]}clear(){y(this,E).clear(),this.checkClear()}};E=new WeakMap,w=new WeakMap;var _=class extends Error{constructor(t){super(t.message);P(this,"code");P(this,"data");this.code=t.code,this.data=t.data,this.name="RpcError"}};var v=class extends Error{constructor(){super("Client destroyed"),this.name="DestroyedError"}};var re=r=>{let e=new Map,t=U(),n=new D,o=null,p=(f,l,u)=>{o.send(JSON.stringify({jsonrpc:"2.0",id:f,method:l,params:u}))};function a(f){try{let l,u,m,b,i,R=JSON.parse(f);if({id:l,result:u,error:m,params:b}=R,l){let h=e.get(l);return h?(e.delete(l),m?h.onError(new _(m)):h.onSuccess(u,(q,L,I)=>{let A=q+L;t.subscribe(A,I);let j=n.retrieve(A);return j.length&&Promise.resolve().then(()=>{j.forEach(x=>{t.next(A,x)})}),()=>{t.unsubscribe(A)}})):void 0}if({subscription:i,result:u,error:m}=b,!i||!m&&!Object.hasOwn(b,"result"))throw 0;let g=R.method+i;t.has(g)||n.set(g,f),m?t.error(g,new _(m)):t.next(g,u)}catch(l){console.warn("Error parsing incomming message: "+f),console.error(l)}}o=r(a);let d=()=>{o?.disconnect(),o=null,t.errorAll(new v),e.forEach(f=>f.onError(new v)),e.clear(),n.clear()},s=1;return{request:(f,l,u)=>{if(!o)throw new Error("Not connected");let m=s++;return u&&e.set(m,u),p(m,f,l),()=>{e.delete(m)}},disconnect:d}};var be=r=>{let{event:e,...t}=r;return{type:e,...t}},Re=new Set(["dropped","invalid","finalized","error"]);function ge(r){return Re.has(r.event)}var M=class extends Error{constructor(t){super(`TxError: ${t.event} - ${t.error}`);P(this,"type");P(this,"error");this.type=t.event,this.error=t.error,this.name="TransactionError"}},G=r=>(e,t,n,o)=>{let p=r(e+"_unstable_submitAndWatch",[t],{onSuccess:(a,d)=>{let s=d(e+"_unstable_watchEvent",a,{next:c=>{if(ge(c)&&(s(),p=T,c.event!=="finalized"))return o(new M(c));n(be(c))},error(c){c instanceof v||p(),p=T,o(c)}});p=()=>{s(),r(e+"_unstable_unwatch",[a])}},onError:o});return()=>{p()}};var k=class extends Error{constructor(){super("ChainHead stopped"),this.name="StopError"}},S=class extends Error{constructor(){super("ChainHead disjointed"),this.name="DisjointError"}},C=class extends Error{constructor(){super("ChainHead operations limit reached"),this.name="OperationLimitError"}},O=class extends Error{constructor(e){super(e),this.name="OperationError"}},F=class extends Error{constructor(){super("ChainHead operation inaccessible"),this.name="OperationInaccessibleError"}};var N=(r,e)=>t=>H((n,o,...p)=>{let[a,d]=e(...p),s=t(r,a,{onSuccess:(c,f)=>{if(c.result==="limitReached")return s=T,o(new C);let l=!0,u=T,m=i=>{l=!1,u(),n(i)},b=i=>{l=!1,u(),o(i)};u=f(c.operationId,{next:i=>{let R=i;R.event==="operationError"?o(new O(R.error)):R.event==="operationInaccessible"?o(new F):d(i,m,b)},error:b}),s=()=>{l&&(u(),t("chainHead_unstable_stopOperation",[c.operationId]))}},onError:o});return()=>{s()}});var te=N("chainHead_unstable_body",r=>[[r],(e,t)=>{t(e.value)}]);var ne=N("chainHead_unstable_call",(r,e,t)=>[[r,e,t],(n,o)=>{o(n.output)}]);var oe=r=>e=>new Promise((t,n)=>{r("chainHead_unstable_header",[e],{onSuccess:t,onError:n})});var X=require("@polkadot-api/utils");var J=r=>(e,t,n,o,p,a,d)=>{if(t.length===0)return a(),X.noop;let s=r("chainHead_unstable_storage",[e,t,n],{onSuccess:(c,f)=>{if(c.result==="limitReached"||c.discardedItems===t.length)return p(new C);let l=f(c.operationId,{next:b=>{switch(b.event){case"operationStorageItems":{o(b.items);break}case"operationStorageDone":{m();break}case"operationError":{u(new O(b.error));break}case"operationInaccessible":{u(new F);break}default:r("chainHead_unstable_continue",[])}},error:p});s=()=>{l(),r("chainHead_unstable_stopOperation",[c.operationId])};let u=b=>{s=X.noop,l(),p(b)},m=()=>{s=X.noop,l(),a()};d(c.discardedItems)},onError:p});return()=>{s()}};var ie=r=>{let e=J(r);return H((t,n,o,p,a,d)=>{let s=p.startsWith("descendants"),c=s?[]:null,l=e(o,[{key:a,type:p}],d??null,s?u=>{c.push(...u)}:u=>{c=u[0]?.[p]},n,()=>{t(c)},u=>{u>0&&(l(),n(new C))});return l})};var se=r=>e=>new Promise((t,n)=>{r("chainHead_unstable_unpin",[e],{onSuccess(){t()},onError:n})});function he(r){return r.operationId!==void 0}function K(r){return(e,t,n)=>{let o=U(),p=new D,a=new Set,d=ee(),s=d.promise,c=i=>{if(he(i))return o.has(i.operationId)||p.set(i.operationId,i),o.next(i.operationId,i);if(i.event!=="stop"){if(i.event==="initialized")return t({type:i.event,finalizedBlockHashes:"finalizedBlockHash"in i?[i.finalizedBlockHash]:i.finalizedBlockHashes,finalizedBlockRuntime:i.finalizedBlockRuntime});let{event:R,...g}=i;return t({type:R,...g})}n(new k),m(!1)},f=i=>{n(i),m(!(i instanceof v))},m=r("chainHead_unstable_follow",[e],{onSuccess:(i,R)=>{let g=R("chainHead_unstable_followEvent",i,{next:c,error:f});m=(h=!0)=>{s=null,m=T,g(),h&&r("chainHead_unstable_unfollow",[i]),o.errorAll(new S),a.forEach(q=>{q()}),a.clear(),p.clear()},s=i,d.res(i)},onError:i=>{i instanceof v?m(!1):n(i),s=null,d.res(i)}}),b=(i,R,g)=>{let h=()=>{g?.onError(new S)};if(s===null)return h(),T;let q=I=>{if(!g)return r(i,[I,...R]);a.add(h);let A=(x,V)=>{if(s===null)return V.error(new S),T;o.subscribe(x,V);let Y=p.retrieve(x);return Y.length&&Promise.resolve().then(()=>{Y.forEach(ae=>{o.next(x,ae)})}),()=>{o.unsubscribe(x)}},j=r(i,[I,...R],{onSuccess:x=>{a.delete(h),g.onSuccess(x,A)},onError:x=>{a.delete(h),g.onError(x)}});return()=>{a.delete(h),j()}};if(typeof s=="string")return q(s);let L=T;return s.then(I=>{if(I instanceof Error)return h();s&&(L=q(I))}),()=>{L()}};return{unfollow(){m(),s=null},body:te(b),call:ne(b),header:oe(b),storage:ie(b),storageSubscription:J(b),unpin:se(b),_request:b}}}var Q=require("@polkadot-api/utils");var Ee=r=>{let e=re(r),t=H((a,d,s,c)=>e.request(s,c,{onSuccess:a,onError:d})),n=t("rpc_methods",[]).then(a=>n=new Set(Array.isArray(a)?a:a.methods));n.catch(Q.noop);let o=a=>a.has("transaction_unstable_submitAndWatch")?"transaction":"transactionWatch",p=G(e.request);return{chainHead:K(e.request),transaction:(a,d,s)=>{if(n instanceof Promise){let c=Q.noop,f=!0;return n.then(l=>{f&&(c=p(o(l),a,d,s))}),()=>{f=!1,c()}}return p(o(n),a,d,s)},destroy:()=>{e.disconnect()},request:t,_request:e.request}}; | ||
"use strict";var H=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var ee=(r,e,t)=>e in r?H(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var re=(r,e)=>{for(var t in e)H(r,t,{get:e[t],enumerable:!0})},te=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Y(e))!Z.call(r,o)&&o!==t&&H(r,o,{get:()=>e[o],enumerable:!(n=X(e,o))||n.enumerable});return r};var oe=r=>te(H({},"__esModule",{value:!0}),r);var L=(r,e,t)=>(ee(r,typeof e!="symbol"?e+"":e,t),t);var ae={};re(ae,{DestroyedError:()=>y,DisjointError:()=>S,OperationError:()=>v,OperationInaccessibleError:()=>w,OperationLimitError:()=>E,RpcError:()=>O,StopError:()=>_,createClient:()=>se});module.exports=oe(ae);var I=require("@polkadot-api/utils"),T=r=>(...e)=>new Promise((t,n)=>{let o=I.noop,[c,l]=e[e.length-1]instanceof AbortSignal?[e.slice(0,e.length-1),e[e.length-1]]:[e],a=()=>{o(),n(new I.AbortError)};l?.addEventListener("abort",a,{once:!0});let m=d=>b=>{o=I.noop,l?.removeEventListener("abort",a),d(b)};o=r(m(t),m(n),...c)});function J(){let r=()=>{},e=()=>{};return{promise:new Promise((n,o)=>{r=n,e=o}),res:r,rej:e}}var g=()=>{};var P=()=>{let r=new Map;return{has:r.has.bind(r),subscribe(e,t){r.set(e,t)},unsubscribe(e){r.delete(e)},next(e,t){r.get(e)?.next(t)},error(e,t){let n=r.get(e);n&&(r.delete(e),n.error(t))},errorAll(e){let t=[...r.values()];r.clear(),t.forEach(n=>{n.error(e)})}}};var M=r=>r.has("transaction_v1_broadcast")?["transaction_v1_broadcast","transaction_v1_stop"]:r.has("transactionWatch_unstable_submitAndWatch")?["transactionWatch_unstable_submitAndWatch","transactionWatch_unstable_unwatch"]:["transaction_unstable_submitAndWatch","transaction_unstable_unwatch"],N=(r,e)=>(t,n)=>{let o=(a,m,d)=>r(m,[a],{onSuccess:b=>{l=b===null?g:()=>{r(d,[b])},b===null&&n(new Error("Max # of broadcasted transactions has been reached"))},onError:n}),c=!0,l=()=>{c=!1};return e instanceof Promise?e.then(M).then(a=>{c&&(l=o(t,...a))}):l=o(t,...M(e)),()=>{l()}};var _=class extends Error{constructor(){super("ChainHead stopped"),this.name="StopError"}},S=class extends Error{constructor(){super("ChainHead disjointed"),this.name="DisjointError"}},E=class extends Error{constructor(){super("ChainHead operations limit reached"),this.name="OperationLimitError"}},v=class extends Error{constructor(e){super(e),this.name="OperationError"}},w=class extends Error{constructor(){super("ChainHead operation inaccessible"),this.name="OperationInaccessibleError"}};var W=(r,e)=>t=>T((n,o,...c)=>{let[l,a]=e(...c),m=t(r,l,{onSuccess:(d,b)=>{if(d.result==="limitReached")return m=g,o(new E);let u=!0,s=g,p=f=>{u=!1,s(),n(f)},i=f=>{u=!1,s(),o(f)};s=b(d.operationId,{next:f=>{let R=f;R.event==="operationError"?o(new v(R.error)):R.event==="operationInaccessible"?o(new w):a(f,p,i)},error:i}),m=()=>{u&&(s(),t("chainHead_unstable_stopOperation",[d.operationId]))}},onError:o});return()=>{m()}});var z=W("chainHead_unstable_body",r=>[[r],(e,t)=>{t(e.value)}]);var $=W("chainHead_unstable_call",(r,e,t)=>[[r,e,t],(n,o)=>{o(n.output)}]);var G=r=>e=>new Promise((t,n)=>{r("chainHead_unstable_header",[e],{onSuccess:t,onError:n})});var D=require("@polkadot-api/utils");var k=r=>(e,t,n,o,c,l,a)=>{if(t.length===0)return l(),D.noop;let m=r("chainHead_unstable_storage",[e,t,n],{onSuccess:(d,b)=>{if(d.result==="limitReached"||d.discardedItems===t.length)return c(new E);let u=b(d.operationId,{next:i=>{switch(i.event){case"operationStorageItems":{o(i.items);break}case"operationStorageDone":{p();break}case"operationError":{s(new v(i.error));break}case"operationInaccessible":{s(new w);break}default:r("chainHead_unstable_continue",[])}},error:c});m=()=>{u(),r("chainHead_unstable_stopOperation",[d.operationId])};let s=i=>{m=D.noop,u(),c(i)},p=()=>{m=D.noop,u(),l()};a(d.discardedItems)},onError:c});return()=>{m()}};var K=r=>{let e=k(r);return T((t,n,o,c,l,a)=>{let m=c.startsWith("descendants"),d=m?[]:null,u=e(o,[{key:l,type:c}],a??null,m?s=>{d.push(s)}:s=>{d=s[0]?.[c]},n,()=>{try{t(m?d.flat():d)}catch(s){n(s)}},s=>{s>0&&(u(),n(new E))});return u})};var Q=r=>e=>e.length>0?new Promise((t,n)=>{r("chainHead_unstable_unpin",[e],{onSuccess(){t()},onError:n})}):Promise.resolve();var y=class extends Error{constructor(){super("Client destroyed"),this.name="DestroyedError"}};function ne(r){return r.operationId!==void 0}function U(r){return(e,t,n)=>{let o=P(),c=new Set,l=J(),a=l.promise,m=i=>{if(ne(i))return o.has(i.operationId)||console.warn("Uknown operationId on",i),o.next(i.operationId,i);if(i.event!=="stop"){if(i.event==="initialized")return t({type:i.event,finalizedBlockHashes:"finalizedBlockHash"in i?[i.finalizedBlockHash]:i.finalizedBlockHashes,finalizedBlockRuntime:i.finalizedBlockRuntime});let{event:f,...R}=i;return t({type:f,...R})}n(new _),s(!1)},d=i=>{n(i),s(!(i instanceof y))},s=r("chainHead_unstable_follow",[e],{onSuccess:(i,f)=>{let R=f("chainHead_unstable_followEvent",i,{next:m,error:d});s=(h=!0)=>{a=null,s=g,R(),h&&r("chainHead_unstable_unfollow",[i]),o.errorAll(new S),c.forEach(C=>{C()}),c.clear()},a=i,l.res(i)},onError:i=>{i instanceof y?s(!1):n(i),a=null,l.res(i)}}),p=(i,f,R)=>{let h=()=>{R?.onError(new S)};if(a===null)return h(),g;let C=x=>{if(!R)return r(i,[x,...f]);c.add(h);let B=(F,j)=>a===null?(j.error(new S),g):(o.subscribe(F,j),()=>{o.unsubscribe(F)}),A=r(i,[x,...f],{onSuccess:F=>{c.delete(h),R.onSuccess(F,B)},onError:F=>{c.delete(h),R.onError(F)}});return()=>{c.delete(h),A()}};if(typeof a=="string")return C(a);let q=g;return a.then(x=>{if(x instanceof Error)return h();a&&(q=C(x))}),()=>{q()}};return{unfollow(){s(),a=null},body:z(p),call:$(p),header:G(p),storage:K(p),storageSubscription:k(p),unpin:Q(p),_request:p}}}var O=class extends Error{constructor(t){super(t.message);L(this,"code");L(this,"data");this.code=t.code,this.data=t.data,this.name="RpcError"}};var ie=1,V=r=>{let e=ie++,t=new Map,n=P(),o=null,c=(b,u,s)=>{o.send(JSON.stringify({jsonrpc:"2.0",id:b,method:u,params:s}))};function l(b){try{let u,s,p,i,f,R=JSON.parse(b);if({id:u,result:s,error:p,params:i}=R,u){let C=t.get(u);return C?(t.delete(u),p?C.onError(new O(p)):C.onSuccess(s,(q,x,B)=>{let A=q+x;return n.subscribe(A,B),()=>{n.unsubscribe(A)}})):void 0}if({subscription:f,result:s,error:p}=i,!f||!p&&!Object.hasOwn(i,"result"))throw 0;let h=R.method+f;p?n.error(h,new O(p)):n.next(h,s)}catch(u){console.warn("Error parsing incomming message: "+b),console.error(u)}}o=r(l);let a=()=>{o?.disconnect(),o=null,n.errorAll(new y),t.forEach(b=>b.onError(new y)),t.clear()},m=1;return{request:(b,u,s)=>{if(!o)throw new Error("Not connected");let p=`${e}-${m++}`;return s&&t.set(p,s),c(p,b,u),()=>{t.delete(p)}},disconnect:a}};var se=r=>{let e=V(r),t=T((o,c,l,a)=>e.request(l,a,{onSuccess:o,onError:c})),n=t("rpc_methods",[]).then(o=>n=new Set(Array.isArray(o)?o:o.methods));return n.catch(g),{chainHead:U(e.request),transaction:N(e.request,n),destroy:()=>{e.disconnect()},request:t,_request:e.request}}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@polkadot-api/substrate-client", | ||
"version": "0.0.1-f435b00462a9f504c81d34285e1669cc94f17008.1.0", | ||
"version": "0.0.1-f466ae02908a3eb95b8a14c3dab67449a6968195.1.0", | ||
"author": "Josep M Sobrepere (https://github.com/josepot)", | ||
@@ -43,5 +43,4 @@ "repository": { | ||
"devDependencies": { | ||
"@vitest/coverage-v8": "^0.34.3", | ||
"@polkadot-api/json-rpc-provider": "0.0.1-f435b00462a9f504c81d34285e1669cc94f17008.1.0", | ||
"@polkadot-api/utils": "0.0.1-f435b00462a9f504c81d34285e1669cc94f17008.1.0" | ||
"@polkadot-api/json-rpc-provider": "0.0.1-f466ae02908a3eb95b8a14c3dab67449a6968195.1.0", | ||
"@polkadot-api/utils": "0.0.1-f466ae02908a3eb95b8a14c3dab67449a6968195.1.0" | ||
}, | ||
@@ -48,0 +47,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
191074
1637