opacity-issuer-core 0.2.2 → 0.3.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/README.md CHANGED
@@ -6,13 +6,23 @@ Backend-independent Opacity protocol helpers, contract ABIs, policy builders, is
6
6
  import { createIssuersNamespace } from 'opacity-issuer-core';
7
7
  import { createSubgraphClient, createIndexerNamespace } from 'opacity-issuer-core/subgraph';
8
8
 
9
- const issuers = createIssuersNamespace({ chainId, publicClient, walletClient });
9
+ const indexer = createIndexerNamespace({ url: process.env.SUBGRAPH_URL! });
10
+ const issuers = createIssuersNamespace({ chainId, publicClient, walletClient, indexer });
11
+ const { deployment, policies } = await issuers.discoverDeployment();
10
12
  const subgraph = createSubgraphClient({ url: process.env.SUBGRAPH_URL! });
11
13
  const data = await subgraph.query<{ tokens: { id: string }[] }>('{ tokens { id } }');
12
- const indexer = createIndexerNamespace({ url: process.env.SUBGRAPH_URL! });
13
14
  const balances = await indexer.listBalances({ wallet });
14
15
  ```
15
16
 
17
+ Version 0.3.0 adds read-only issuer deployment discovery: indexed evidence selects the protocol,
18
+ RPC verifies its current factory and registries, and the registry's owner-selected contract
19
+ operator identifies its policy engine and approved policy catalog. No copied address manifest or
20
+ existing asset owned by the new issuer is needed. Unsupported governance wiring (including an EOA
21
+ operator), stale data and ambiguous factories fail closed, without a static-address fallback.
22
+ Discovery neither upgrades contracts nor grants issuer roles; prepare and explicitly send each
23
+ registration/deployment action separately. See the
24
+ [issuer lifecycle guide](https://github.com/OpacityLabs/opacity-issuer-sdk/blob/main/docs/issuer-lifecycle.md).
25
+
16
26
  Keep authenticated subgraph URLs and headers in your application's server configuration. The direct clients share one HTTP transport, default to global `fetch` with a 30-second deadline, and accept cancellation and timeout overrides; the generic client also accepts headers and an injected fetch implementation so the application controls caching. HTTP failures, GraphQL errors (including partial responses), and absent data objects reject.
17
27
 
18
28
  `opacity-issuer-core/subgraph` also exports the fixed hosted API operation list, lossless bigint wire helpers, and the shared operation argument and response validators used by the SDK and mobile-api. The same argument contract validates direct reads and decoded hosted requests, including unknown keys, uint256 quantities, snapshot bounds and cursor shapes. API adapters can apply tighter request budgets. These helpers do not choose an upstream endpoint.
@@ -885,5 +885,5 @@ function asNumber(value) {
885
885
  }
886
886
 
887
887
  export { SANDBOX_CHAIN_ID, SANDBOX_DEPLOYMENTS, SANDBOX_IMPLEMENTATION_VERSION, SANDBOX_TRAIT_IDS, SEPOLIA_CHAIN_ID, SEPOLIA_SANDBOX_MANIFEST, assertDocumentMatchesHash, buildAttestDocumentTransaction, buildDocumentAcceptanceTypedData, buildSandboxAddSelfTransaction, buildSandboxRegisterIssuerTransaction, buildSandboxSetSelfTraitTransaction, documentAttestorAbi, documentTraitId, getSandboxDeployment, hashDocument, hashDocumentAcceptance, probeSandboxRegistry, requireSandboxDeployment, sandboxAllowlistRegistryAbi, sandboxUserId, toEip1193Json, toEip1193TypedData, toEip712Json, toEip712JsonPayload, toEthersTypedData, toJsonRpcTransaction, toSandboxAddSelfWriteContractRequest, toSandboxRegisterIssuerWriteContractRequest, toSandboxSetSelfTraitWriteContractRequest, toViemTypedData, toWriteContractRequest, verifyAttestationSession };
888
- //# sourceMappingURL=chunk-7ODYBEZH.js.map
889
- //# sourceMappingURL=chunk-7ODYBEZH.js.map
888
+ //# sourceMappingURL=chunk-F73OBTKE.js.map
889
+ //# sourceMappingURL=chunk-F73OBTKE.js.map