@xyo-network/react-chain-blockchain 1.7.5 → 1.7.6
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/README.md +26 -3
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts +48 -0
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
- package/dist/browser/index.mjs +4 -0
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +4 -1
package/README.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[![logo][]](https://xyo.network)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[![npm-badge][]][npm-link]
|
|
6
|
+
[![npm-downloads-badge][]][npm-link]
|
|
7
|
+
[![jsdelivr-badge][]][jsdelivr-link]
|
|
8
|
+
[![npm-license-badge][]](LICENSE)
|
|
9
|
+
[![socket-badge][]][socket-link]
|
|
10
|
+
|
|
11
|
+
Version: 1.7.3
|
|
6
12
|
|
|
7
13
|
XYO Layer One React SDK Blockchain
|
|
8
14
|
|
|
@@ -10,7 +16,12 @@ XYO Layer One React SDK Blockchain
|
|
|
10
16
|
|
|
11
17
|
[TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__react-chain-blockchain)
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
## Maintainers
|
|
20
|
+
|
|
21
|
+
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
22
|
+
- [Matt Jones](https://github.com/jonesmac)
|
|
23
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
24
|
+
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
14
25
|
|
|
15
26
|
## License
|
|
16
27
|
|
|
@@ -20,4 +31,16 @@ Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-c
|
|
|
20
31
|
|
|
21
32
|
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
22
33
|
|
|
23
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
34
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
35
|
+
|
|
36
|
+
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/react-chain-blockchain.svg
|
|
37
|
+
[npm-link]: https://www.npmjs.com/package/@xyo-network/react-chain-blockchain
|
|
38
|
+
|
|
39
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xyo-network/react-chain-blockchain
|
|
40
|
+
[npm-license-badge]: https://img.shields.io/npm/l/@xyo-network/react-chain-blockchain
|
|
41
|
+
|
|
42
|
+
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xyo-network/react-chain-blockchain/badge
|
|
43
|
+
[jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xyo-network/react-chain-blockchain
|
|
44
|
+
|
|
45
|
+
[socket-badge]: https://socket.dev/api/badge/npm/package/@xyo-network/react-chain-blockchain
|
|
46
|
+
[socket-link]: https://socket.dev/npm/package/@xyo-network/react-chain-blockchain
|
|
@@ -6,6 +6,54 @@ export declare const resolveDefinedHead: (head: Hash, chainArchivist: ReadArchiv
|
|
|
6
6
|
export declare const useChainIteratorParams: ({ chainArchivist, chainId, head, name, }: BlockChainIterator) => [{
|
|
7
7
|
chainArchivist: import("@xyo-network/archivist-model").ArchivistInstance<import("@xyo-network/archivist-model").ArchivistParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig>>, import("@xyo-network/archivist-model").ArchivistModuleEventData, import("@xyo-network/payload-model").Payload>;
|
|
8
8
|
chainId: Lowercase<string>;
|
|
9
|
+
config: {
|
|
10
|
+
chain: {
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
logLevel: "error" | "warn" | "info" | "log" | "debug" | "trace";
|
|
14
|
+
storage: {
|
|
15
|
+
root?: string | undefined;
|
|
16
|
+
mongo?: {
|
|
17
|
+
connectionString?: string | undefined;
|
|
18
|
+
database?: string | undefined;
|
|
19
|
+
domain?: string | undefined;
|
|
20
|
+
password?: string | undefined;
|
|
21
|
+
username?: string | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
};
|
|
24
|
+
silent: boolean;
|
|
25
|
+
api: {
|
|
26
|
+
host: string;
|
|
27
|
+
port: number;
|
|
28
|
+
mnemonic?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
app: {
|
|
31
|
+
port: number;
|
|
32
|
+
};
|
|
33
|
+
evm: {
|
|
34
|
+
chainId?: string | undefined;
|
|
35
|
+
infura?: {
|
|
36
|
+
projectId?: string | undefined;
|
|
37
|
+
projectSecret?: string | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
jsonRpc?: {
|
|
40
|
+
url?: string | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
};
|
|
43
|
+
producer: {
|
|
44
|
+
port: number;
|
|
45
|
+
minStake: number;
|
|
46
|
+
mnemonic?: string | undefined;
|
|
47
|
+
healthCheckPort?: number | undefined;
|
|
48
|
+
disableIntentRedeclaration?: boolean | undefined;
|
|
49
|
+
rewardAddress?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
telemetry: {
|
|
52
|
+
otel?: {
|
|
53
|
+
otlpEndpoint?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
9
57
|
head: import("@xylabs/object").DeepRestrictToStringKeys<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
10
58
|
schema: string;
|
|
11
59
|
}> & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & import("@xyo-network/payload-model").StorageMeta & import("@xylabs/object").DeepRestrictToStringKeys<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/boundwitness-model").BoundWitnessFields & import("@xyo-network/xl1-protocol").BlockBoundWitnessFields & import("@xyo-network/xl1-protocol").BlockBoundWitnessMeta & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,aAAa,CAAA;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"useChainIteratorParams.d.ts","sourceRoot":"","sources":["../../../../src/hooks/chain-iterator/useChainIteratorParams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,aAAa,CAAA;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAIlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,kBAAkB,GAAU,MAAM,IAAI,EAAE,gBAAgB,aAAa,iFAajF,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,0CAEpC,kBAAkB;;;;;cAiBg2H,CAAC;;;;gBAA6H,CAAC;iBAAmC,CAAC;gCAAgC,CAAC;wBAA0C,CAAC;sBAAwC,CAAC;wBAA0C,CAAC;wBAA0C,CAAC;;;;;;;oBAAgJ,CAAC;;;;;;mBAA+F,CAAC;kBAAoC,CAAC;yBAAyB,CAAC;6BAA+C,CAAC;;mBAA4D,CAAC;mBAAmB,CAAC;;;;;;oBAAoI,CAAC;2BAA6C,CAAC;sCAAwD,CAAC;yBAA4C,CAAC;;;gBAA0D,CAAC;4BAA4B,CAAC;;;;;;;;;;;;8FADpgK,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -410,6 +410,7 @@ import { usePromise } from "@xylabs/react-promise";
|
|
|
410
410
|
import { isDefined } from "@xylabs/typeof";
|
|
411
411
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
412
412
|
import { isBlockBoundWitness } from "@xyo-network/xl1-protocol";
|
|
413
|
+
import { getDefaultConfig } from "@xyo-network/xl1-protocol-sdk";
|
|
413
414
|
var resolveDefinedHead = /* @__PURE__ */ __name(async (head, chainArchivist) => {
|
|
414
415
|
const [headPayload] = await chainArchivist.get([
|
|
415
416
|
head
|
|
@@ -429,9 +430,12 @@ var useChainIteratorParams = /* @__PURE__ */ __name(({ chainArchivist, chainId,
|
|
|
429
430
|
]);
|
|
430
431
|
const foundResult = assertEx2(result, () => `Head not found: ${head}`);
|
|
431
432
|
const resolvedHead = assertEx2(isBlockBoundWitness(foundResult) ? foundResult : void 0, () => `Head is not a boundwitness: ${JSON.stringify(foundResult)}`);
|
|
433
|
+
const config = getDefaultConfig();
|
|
434
|
+
config.chain.id = chainId;
|
|
432
435
|
return {
|
|
433
436
|
chainArchivist,
|
|
434
437
|
chainId,
|
|
438
|
+
config,
|
|
435
439
|
head: resolvedHead,
|
|
436
440
|
name
|
|
437
441
|
};
|