repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/search.py | StorageRecordSearch.fetch | async def fetch(self, limit: int = None) -> Sequence[StorageRecord]:
"""
Fetch next batch of search results.
Raise BadSearch if search is closed, WalletState if wallet is closed.
:param limit: maximum number of records to return (default value Wallet.DEFAULT_CHUNK)
:return: nex... | python | async def fetch(self, limit: int = None) -> Sequence[StorageRecord]:
"""
Fetch next batch of search results.
Raise BadSearch if search is closed, WalletState if wallet is closed.
:param limit: maximum number of records to return (default value Wallet.DEFAULT_CHUNK)
:return: nex... | [
"async",
"def",
"fetch",
"(",
"self",
",",
"limit",
":",
"int",
"=",
"None",
")",
"->",
"Sequence",
"[",
"StorageRecord",
"]",
":",
"LOGGER",
".",
"debug",
"(",
"'StorageRecordSearch.fetch >>> limit: %s'",
",",
"limit",
")",
"if",
"not",
"self",
".",
"open... | Fetch next batch of search results.
Raise BadSearch if search is closed, WalletState if wallet is closed.
:param limit: maximum number of records to return (default value Wallet.DEFAULT_CHUNK)
:return: next batch of records found | [
"Fetch",
"next",
"batch",
"of",
"search",
"results",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/search.py#L120-L147 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/search.py | StorageRecordSearch.close | async def close(self) -> None:
"""
Close search.
"""
LOGGER.debug('StorageRecordSearch.close >>>')
if self._handle:
await non_secrets.close_wallet_search(self.handle)
self._handle = None
LOGGER.debug('StorageRecordSearch.close <<<') | python | async def close(self) -> None:
"""
Close search.
"""
LOGGER.debug('StorageRecordSearch.close >>>')
if self._handle:
await non_secrets.close_wallet_search(self.handle)
self._handle = None
LOGGER.debug('StorageRecordSearch.close <<<') | [
"async",
"def",
"close",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'StorageRecordSearch.close >>>'",
")",
"if",
"self",
".",
"_handle",
":",
"await",
"non_secrets",
".",
"close_wallet_search",
"(",
"self",
".",
"handle",
")",
"self",... | Close search. | [
"Close",
"search",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/search.py#L164-L175 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/nodepool.py | NodePool.cache_id | def cache_id(self) -> str:
"""
Return identifier for archivable caches, computing it first and retaining it if need be.
Raise AbsentPool if ledger configuration is not yet available.
:param name: pool name
:return: archivable cache identifier
"""
if self._cache_... | python | def cache_id(self) -> str:
"""
Return identifier for archivable caches, computing it first and retaining it if need be.
Raise AbsentPool if ledger configuration is not yet available.
:param name: pool name
:return: archivable cache identifier
"""
if self._cache_... | [
"def",
"cache_id",
"(",
"self",
")",
"->",
"str",
":",
"if",
"self",
".",
"_cache_id",
":",
"return",
"self",
".",
"_cache_id",
"with",
"open",
"(",
"join",
"(",
"expanduser",
"(",
"'~'",
")",
",",
"'.indy_client'",
",",
"'pool'",
",",
"self",
".",
"... | Return identifier for archivable caches, computing it first and retaining it if need be.
Raise AbsentPool if ledger configuration is not yet available.
:param name: pool name
:return: archivable cache identifier | [
"Return",
"identifier",
"for",
"archivable",
"caches",
"computing",
"it",
"first",
"and",
"retaining",
"it",
"if",
"need",
"be",
".",
"Raise",
"AbsentPool",
"if",
"ledger",
"configuration",
"is",
"not",
"yet",
"available",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/nodepool.py#L101-L122 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/nodepool.py | NodePool.open | async def open(self) -> 'NodePool':
"""
Explicit entry. Opens pool as configured, for later closure via close().
Creates pool if it does not yet exist, using configured genesis transaction file.
For use when keeping pool open across multiple calls.
Raise any AbsentPool if node p... | python | async def open(self) -> 'NodePool':
"""
Explicit entry. Opens pool as configured, for later closure via close().
Creates pool if it does not yet exist, using configured genesis transaction file.
For use when keeping pool open across multiple calls.
Raise any AbsentPool if node p... | [
"async",
"def",
"open",
"(",
"self",
")",
"->",
"'NodePool'",
":",
"LOGGER",
".",
"debug",
"(",
"'NodePool.open >>>'",
")",
"await",
"pool",
".",
"set_protocol_version",
"(",
"self",
".",
"protocol",
".",
"indy",
"(",
")",
")",
"LOGGER",
".",
"info",
"("... | Explicit entry. Opens pool as configured, for later closure via close().
Creates pool if it does not yet exist, using configured genesis transaction file.
For use when keeping pool open across multiple calls.
Raise any AbsentPool if node pool ledger configuration is not available.
:ret... | [
"Explicit",
"entry",
".",
"Opens",
"pool",
"as",
"configured",
"for",
"later",
"closure",
"via",
"close",
"()",
".",
"Creates",
"pool",
"if",
"it",
"does",
"not",
"yet",
"exist",
"using",
"configured",
"genesis",
"transaction",
"file",
".",
"For",
"use",
"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/nodepool.py#L140-L169 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/nodepool.py | NodePool.close | async def close(self) -> None:
"""
Explicit exit. Closes pool. For use when keeping pool open across multiple calls.
"""
LOGGER.debug('NodePool.close >>>')
if not self.handle:
LOGGER.warning('Abstaining from closing pool %s: already closed', self.name)
else:... | python | async def close(self) -> None:
"""
Explicit exit. Closes pool. For use when keeping pool open across multiple calls.
"""
LOGGER.debug('NodePool.close >>>')
if not self.handle:
LOGGER.warning('Abstaining from closing pool %s: already closed', self.name)
else:... | [
"async",
"def",
"close",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'NodePool.close >>>'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"warning",
"(",
"'Abstaining from closing pool %s: already closed'",
",",
"self",
".... | Explicit exit. Closes pool. For use when keeping pool open across multiple calls. | [
"Explicit",
"exit",
".",
"Closes",
"pool",
".",
"For",
"use",
"when",
"keeping",
"pool",
"open",
"across",
"multiple",
"calls",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/nodepool.py#L188-L201 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/nodepool.py | NodePool.refresh | async def refresh(self) -> None:
"""
Refresh local copy of pool ledger and update node pool connections.
"""
LOGGER.debug('NodePool.refresh >>>')
await pool.refresh_pool_ledger(self.handle)
LOGGER.debug('NodePool.refresh <<<') | python | async def refresh(self) -> None:
"""
Refresh local copy of pool ledger and update node pool connections.
"""
LOGGER.debug('NodePool.refresh >>>')
await pool.refresh_pool_ledger(self.handle)
LOGGER.debug('NodePool.refresh <<<') | [
"async",
"def",
"refresh",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'NodePool.refresh >>>'",
")",
"await",
"pool",
".",
"refresh_pool_ledger",
"(",
"self",
".",
"handle",
")",
"LOGGER",
".",
"debug",
"(",
"'NodePool.refresh <<<'",
"... | Refresh local copy of pool ledger and update node pool connections. | [
"Refresh",
"local",
"copy",
"of",
"pool",
"ledger",
"and",
"update",
"node",
"pool",
"connections",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/nodepool.py#L203-L212 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.reseed | async def reseed(self, seed: str = None) -> None:
"""
Rotate key for VON anchor: generate new key, submit to ledger, update wallet.
Raise WalletState if wallet is currently closed.
:param seed: new seed for ed25519 key pair (default random)
"""
LOGGER.debug('BaseAnchor.... | python | async def reseed(self, seed: str = None) -> None:
"""
Rotate key for VON anchor: generate new key, submit to ledger, update wallet.
Raise WalletState if wallet is currently closed.
:param seed: new seed for ed25519 key pair (default random)
"""
LOGGER.debug('BaseAnchor.... | [
"async",
"def",
"reseed",
"(",
"self",
",",
"seed",
":",
"str",
"=",
"None",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.reseed >>> seed: [SEED]'",
")",
"verkey",
"=",
"await",
"self",
".",
"wallet",
".",
"reseed_init",
"(",
"seed",
... | Rotate key for VON anchor: generate new key, submit to ledger, update wallet.
Raise WalletState if wallet is currently closed.
:param seed: new seed for ed25519 key pair (default random) | [
"Rotate",
"key",
"for",
"VON",
"anchor",
":",
"generate",
"new",
"key",
"submit",
"to",
"ledger",
"update",
"wallet",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"currently",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L202-L222 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.get_nym | async def get_nym(self, target_did: str = None) -> str:
"""
Get json cryptonym (including current verification key) for input (anchor) DID from ledger.
Return empty production {} if the ledger has no such cryptonym.
Raise BadLedgerTxn on failure. Raise WalletState if target DID is defau... | python | async def get_nym(self, target_did: str = None) -> str:
"""
Get json cryptonym (including current verification key) for input (anchor) DID from ledger.
Return empty production {} if the ledger has no such cryptonym.
Raise BadLedgerTxn on failure. Raise WalletState if target DID is defau... | [
"async",
"def",
"get_nym",
"(",
"self",
",",
"target_did",
":",
"str",
"=",
"None",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.get_nym >>> target_did: %s'",
",",
"target_did",
")",
"if",
"target_did",
"and",
"not",
"ok_did",
"(",
"targe... | Get json cryptonym (including current verification key) for input (anchor) DID from ledger.
Return empty production {} if the ledger has no such cryptonym.
Raise BadLedgerTxn on failure. Raise WalletState if target DID is default (own DID) value but
wallet does not have it (neither created nor ... | [
"Get",
"json",
"cryptonym",
"(",
"including",
"current",
"verification",
"key",
")",
"for",
"input",
"(",
"anchor",
")",
"DID",
"from",
"ledger",
".",
"Return",
"empty",
"production",
"{}",
"if",
"the",
"ledger",
"has",
"no",
"such",
"cryptonym",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L224-L255 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.get_nym_role | async def get_nym_role(self, target_did: str = None) -> Role:
"""
Return the cryptonym role for input did from the ledger - note that this may exceed
the role of least privilege for the class.
Raise AbsentNym if current anchor has no cryptonym on the ledger, or WalletState if current DI... | python | async def get_nym_role(self, target_did: str = None) -> Role:
"""
Return the cryptonym role for input did from the ledger - note that this may exceed
the role of least privilege for the class.
Raise AbsentNym if current anchor has no cryptonym on the ledger, or WalletState if current DI... | [
"async",
"def",
"get_nym_role",
"(",
"self",
",",
"target_did",
":",
"str",
"=",
"None",
")",
"->",
"Role",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.get_nym_role >>> target_did: %s'",
",",
"target_did",
")",
"nym",
"=",
"json",
".",
"loads",
"(",
"awai... | Return the cryptonym role for input did from the ledger - note that this may exceed
the role of least privilege for the class.
Raise AbsentNym if current anchor has no cryptonym on the ledger, or WalletState if current DID unavailable.
:param target_did: DID of cryptonym role to fetch (default... | [
"Return",
"the",
"cryptonym",
"role",
"for",
"input",
"did",
"from",
"the",
"ledger",
"-",
"note",
"that",
"this",
"may",
"exceed",
"the",
"role",
"of",
"least",
"privilege",
"for",
"the",
"class",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L257-L278 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.least_role | def least_role() -> Role:
"""
Return the indy-sdk role of least privilege for an anchor (class) in building
its cryptonym for the trust anchor to send to the ledger.
:return: role of least privilege by anchor class
"""
LOGGER.debug('BaseAnchor.least_role >>>')
... | python | def least_role() -> Role:
"""
Return the indy-sdk role of least privilege for an anchor (class) in building
its cryptonym for the trust anchor to send to the ledger.
:return: role of least privilege by anchor class
"""
LOGGER.debug('BaseAnchor.least_role >>>')
... | [
"def",
"least_role",
"(",
")",
"->",
"Role",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.least_role >>>'",
")",
"rv",
"=",
"Role",
".",
"TRUST_ANCHOR",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.least_role <<< %s'",
",",
"rv",
")",
"return",
"rv"
] | Return the indy-sdk role of least privilege for an anchor (class) in building
its cryptonym for the trust anchor to send to the ledger.
:return: role of least privilege by anchor class | [
"Return",
"the",
"indy",
"-",
"sdk",
"role",
"of",
"least",
"privilege",
"for",
"an",
"anchor",
"(",
"class",
")",
"in",
"building",
"its",
"cryptonym",
"for",
"the",
"trust",
"anchor",
"to",
"send",
"to",
"the",
"ledger",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L281-L294 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.set_did_endpoint | async def set_did_endpoint(self, remote_did: str, did_endpoint: str) -> EndpointInfo:
"""
Set endpoint as metadata for pairwise remote DID in wallet. Pick up (transport)
verification key from pairwise relation and return with endpoint in EndpointInfo.
Raise BadIdentifier on bad DID. R... | python | async def set_did_endpoint(self, remote_did: str, did_endpoint: str) -> EndpointInfo:
"""
Set endpoint as metadata for pairwise remote DID in wallet. Pick up (transport)
verification key from pairwise relation and return with endpoint in EndpointInfo.
Raise BadIdentifier on bad DID. R... | [
"async",
"def",
"set_did_endpoint",
"(",
"self",
",",
"remote_did",
":",
"str",
",",
"did_endpoint",
":",
"str",
")",
"->",
"EndpointInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.set_did_endpoint >>> remote_did: %s, did_endpoint: %s'",
",",
"remote_did",
",",
... | Set endpoint as metadata for pairwise remote DID in wallet. Pick up (transport)
verification key from pairwise relation and return with endpoint in EndpointInfo.
Raise BadIdentifier on bad DID. Raise WalletState if wallet is closed.
Raise AbsentRecord if pairwise relation not present in wallet... | [
"Set",
"endpoint",
"as",
"metadata",
"for",
"pairwise",
"remote",
"DID",
"in",
"wallet",
".",
"Pick",
"up",
"(",
"transport",
")",
"verification",
"key",
"from",
"pairwise",
"relation",
"and",
"return",
"with",
"endpoint",
"in",
"EndpointInfo",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L296-L335 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.get_did_endpoint | async def get_did_endpoint(self, remote_did: str) -> EndpointInfo:
"""
Return endpoint info for remote DID.
Raise BadIdentifier for bad remote DID. Raise WalletState if bypassing cache but wallet is closed.
Raise AbsentRecord for no such endpoint.
:param remote_did: pairwise rem... | python | async def get_did_endpoint(self, remote_did: str) -> EndpointInfo:
"""
Return endpoint info for remote DID.
Raise BadIdentifier for bad remote DID. Raise WalletState if bypassing cache but wallet is closed.
Raise AbsentRecord for no such endpoint.
:param remote_did: pairwise rem... | [
"async",
"def",
"get_did_endpoint",
"(",
"self",
",",
"remote_did",
":",
"str",
")",
"->",
"EndpointInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.get_did_endpoint >>> remote_did: %s'",
",",
"remote_did",
")",
"if",
"not",
"ok_did",
"(",
"remote_did",
")",
... | Return endpoint info for remote DID.
Raise BadIdentifier for bad remote DID. Raise WalletState if bypassing cache but wallet is closed.
Raise AbsentRecord for no such endpoint.
:param remote_did: pairwise remote DID
:return: endpoint and (transport) verification key as EndpointInfo | [
"Return",
"endpoint",
"info",
"for",
"remote",
"DID",
".",
"Raise",
"BadIdentifier",
"for",
"bad",
"remote",
"DID",
".",
"Raise",
"WalletState",
"if",
"bypassing",
"cache",
"but",
"wallet",
"is",
"closed",
".",
"Raise",
"AbsentRecord",
"for",
"no",
"such",
"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L337-L364 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.send_endpoint | async def send_endpoint(self, endpoint: str) -> None:
"""
Send anchor's own endpoint attribute to ledger (and endpoint cache),
if ledger does not yet have input value. Specify None to clear.
Raise BadIdentifier on endpoint not formatted as '<ip-address>:<port>',
BadLedgerTxn on ... | python | async def send_endpoint(self, endpoint: str) -> None:
"""
Send anchor's own endpoint attribute to ledger (and endpoint cache),
if ledger does not yet have input value. Specify None to clear.
Raise BadIdentifier on endpoint not formatted as '<ip-address>:<port>',
BadLedgerTxn on ... | [
"async",
"def",
"send_endpoint",
"(",
"self",
",",
"endpoint",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.send_endpoint >>> endpoint: %s'",
",",
"endpoint",
")",
"ledger_endpoint",
"=",
"await",
"self",
".",
"get_endpoint",
"("... | Send anchor's own endpoint attribute to ledger (and endpoint cache),
if ledger does not yet have input value. Specify None to clear.
Raise BadIdentifier on endpoint not formatted as '<ip-address>:<port>',
BadLedgerTxn on failure, WalletState if wallet is closed.
:param endpoint: value ... | [
"Send",
"anchor",
"s",
"own",
"endpoint",
"attribute",
"to",
"ledger",
"(",
"and",
"endpoint",
"cache",
")",
"if",
"ledger",
"does",
"not",
"yet",
"have",
"input",
"value",
".",
"Specify",
"None",
"to",
"clear",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L366-L403 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.get_endpoint | async def get_endpoint(self, target_did: str = None, from_cache: bool = True) -> str:
"""
Get endpoint attribute for anchor having input DID (default own DID).
Raise WalletState if target DID is default (own DID) value but wallet does not have it
(neither created nor opened since initial... | python | async def get_endpoint(self, target_did: str = None, from_cache: bool = True) -> str:
"""
Get endpoint attribute for anchor having input DID (default own DID).
Raise WalletState if target DID is default (own DID) value but wallet does not have it
(neither created nor opened since initial... | [
"async",
"def",
"get_endpoint",
"(",
"self",
",",
"target_did",
":",
"str",
"=",
"None",
",",
"from_cache",
":",
"bool",
"=",
"True",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.get_endpoint >>> target_did: %s, from_cache: %s'",
",",
"target... | Get endpoint attribute for anchor having input DID (default own DID).
Raise WalletState if target DID is default (own DID) value but wallet does not have it
(neither created nor opened since initialization).
:param target_did: DID of anchor for which to find endpoint attribute on ledger
... | [
"Get",
"endpoint",
"attribute",
"for",
"anchor",
"having",
"input",
"DID",
"(",
"default",
"own",
"DID",
")",
".",
"Raise",
"WalletState",
"if",
"target",
"DID",
"is",
"default",
"(",
"own",
"DID",
")",
"value",
"but",
"wallet",
"does",
"not",
"have",
"i... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L405-L459 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor._submit | async def _submit(self, req_json: str) -> str:
"""
Submit (json) request to ledger; return (json) result.
Raise AbsentPool for no pool, ClosedPool if pool is not yet open, or BadLedgerTxn on failure.
:param req_json: json of request to sign and submit
:return: json response
... | python | async def _submit(self, req_json: str) -> str:
"""
Submit (json) request to ledger; return (json) result.
Raise AbsentPool for no pool, ClosedPool if pool is not yet open, or BadLedgerTxn on failure.
:param req_json: json of request to sign and submit
:return: json response
... | [
"async",
"def",
"_submit",
"(",
"self",
",",
"req_json",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor._submit >>> req_json: %s'",
",",
"req_json",
")",
"if",
"not",
"self",
".",
"pool",
":",
"LOGGER",
".",
"debug",
"(",
"'... | Submit (json) request to ledger; return (json) result.
Raise AbsentPool for no pool, ClosedPool if pool is not yet open, or BadLedgerTxn on failure.
:param req_json: json of request to sign and submit
:return: json response | [
"Submit",
"(",
"json",
")",
"request",
"to",
"ledger",
";",
"return",
"(",
"json",
")",
"result",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L461-L490 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor._verkey_for | async def _verkey_for(self, target: str) -> str:
"""
Given a DID, retrieve its verification key, looking in wallet, then pool.
Given a verification key or None, return input.
Raise WalletState if the wallet is closed. Given a recipient DID not in the wallet,
raise AbsentPool if ... | python | async def _verkey_for(self, target: str) -> str:
"""
Given a DID, retrieve its verification key, looking in wallet, then pool.
Given a verification key or None, return input.
Raise WalletState if the wallet is closed. Given a recipient DID not in the wallet,
raise AbsentPool if ... | [
"async",
"def",
"_verkey_for",
"(",
"self",
",",
"target",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor._verkey_for >>> target: %s'",
",",
"target",
")",
"rv",
"=",
"target",
"if",
"rv",
"is",
"None",
"or",
"not",
"ok_did",
... | Given a DID, retrieve its verification key, looking in wallet, then pool.
Given a verification key or None, return input.
Raise WalletState if the wallet is closed. Given a recipient DID not in the wallet,
raise AbsentPool if the instance has no pool or ClosedPool if its pool is closed.
... | [
"Given",
"a",
"DID",
"retrieve",
"its",
"verification",
"key",
"looking",
"in",
"wallet",
"then",
"pool",
".",
"Given",
"a",
"verification",
"key",
"or",
"None",
"return",
"input",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L547-L593 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.encrypt | async def encrypt(self, message: bytes, authn: bool = False, recip: str = None) -> bytes:
"""
Encrypt plaintext for owner of DID or verification key, anonymously or via
authenticated encryption scheme. If given DID, first check wallet and then pool
for corresponding verification key.
... | python | async def encrypt(self, message: bytes, authn: bool = False, recip: str = None) -> bytes:
"""
Encrypt plaintext for owner of DID or verification key, anonymously or via
authenticated encryption scheme. If given DID, first check wallet and then pool
for corresponding verification key.
... | [
"async",
"def",
"encrypt",
"(",
"self",
",",
"message",
":",
"bytes",
",",
"authn",
":",
"bool",
"=",
"False",
",",
"recip",
":",
"str",
"=",
"None",
")",
"->",
"bytes",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.encrypt >>> message: %s, authn: %s, recip... | Encrypt plaintext for owner of DID or verification key, anonymously or via
authenticated encryption scheme. If given DID, first check wallet and then pool
for corresponding verification key.
Raise WalletState if the wallet is closed. Given a recipient DID not in the wallet,
raise Absent... | [
"Encrypt",
"plaintext",
"for",
"owner",
"of",
"DID",
"or",
"verification",
"key",
"anonymously",
"or",
"via",
"authenticated",
"encryption",
"scheme",
".",
"If",
"given",
"DID",
"first",
"check",
"wallet",
"and",
"then",
"pool",
"for",
"corresponding",
"verifica... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L747-L771 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.decrypt | async def decrypt(self, ciphertext: bytes, sender: str = None) -> (bytes, str):
"""
Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation reveals sender key distinct from current
verification key of owner of input DID. Raise WalletState if wall... | python | async def decrypt(self, ciphertext: bytes, sender: str = None) -> (bytes, str):
"""
Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation reveals sender key distinct from current
verification key of owner of input DID. Raise WalletState if wall... | [
"async",
"def",
"decrypt",
"(",
"self",
",",
"ciphertext",
":",
"bytes",
",",
"sender",
":",
"str",
"=",
"None",
")",
"->",
"(",
"bytes",
",",
"str",
")",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.decrypt >>> ciphertext: %s, sender: %s'",
",",
"cipherte... | Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation reveals sender key distinct from current
verification key of owner of input DID. Raise WalletState if wallet is closed.
:param ciphertext: ciphertext, as bytes
:param sender: DID or verific... | [
"Decrypt",
"ciphertext",
"and",
"optionally",
"authenticate",
"sender",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L773-L801 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.sign | async def sign(self, message: bytes) -> bytes:
"""
Sign message; return signature. Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:return: signature, as bytes
"""
LOGGER.debug('BaseAnchor.sign >>> message: %s', message)
if not ... | python | async def sign(self, message: bytes) -> bytes:
"""
Sign message; return signature. Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:return: signature, as bytes
"""
LOGGER.debug('BaseAnchor.sign >>> message: %s', message)
if not ... | [
"async",
"def",
"sign",
"(",
"self",
",",
"message",
":",
"bytes",
")",
"->",
"bytes",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.sign >>> message: %s'",
",",
"message",
")",
"if",
"not",
"self",
".",
"wallet",
".",
"handle",
":",
"LOGGER",
".",
"deb... | Sign message; return signature. Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:return: signature, as bytes | [
"Sign",
"message",
";",
"return",
"signature",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L803-L820 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.verify | async def verify(self, message: bytes, signature: bytes, signer: str = None) -> bool:
"""
Verify signature with input signer verification key (via lookup by DID first if need be).
Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:param signature: ... | python | async def verify(self, message: bytes, signature: bytes, signer: str = None) -> bool:
"""
Verify signature with input signer verification key (via lookup by DID first if need be).
Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:param signature: ... | [
"async",
"def",
"verify",
"(",
"self",
",",
"message",
":",
"bytes",
",",
"signature",
":",
"bytes",
",",
"signer",
":",
"str",
"=",
"None",
")",
"->",
"bool",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.verify >>> signer: %s, message: %s, signature: %s'",
... | Verify signature with input signer verification key (via lookup by DID first if need be).
Raise WalletState if wallet is closed.
:param message: Content to sign, as bytes
:param signature: signature, as bytes
:param signer: signer DID or verification key; omit for anchor's own
:... | [
"Verify",
"signature",
"with",
"input",
"signer",
"verification",
"key",
"(",
"via",
"lookup",
"by",
"DID",
"first",
"if",
"need",
"be",
")",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L822-L845 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/base.py | BaseAnchor.get_txn | async def get_txn(self, seq_no: int) -> str:
"""
Find a transaction on the distributed ledger by its sequence number.
:param seq_no: transaction number
:return: json sequence number of transaction, null for no match
"""
LOGGER.debug('BaseAnchor.get_txn >>> seq_no: %s', ... | python | async def get_txn(self, seq_no: int) -> str:
"""
Find a transaction on the distributed ledger by its sequence number.
:param seq_no: transaction number
:return: json sequence number of transaction, null for no match
"""
LOGGER.debug('BaseAnchor.get_txn >>> seq_no: %s', ... | [
"async",
"def",
"get_txn",
"(",
"self",
",",
"seq_no",
":",
"int",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'BaseAnchor.get_txn >>> seq_no: %s'",
",",
"seq_no",
")",
"rv_json",
"=",
"json",
".",
"dumps",
"(",
"{",
"}",
")",
"req_json",
"=",
... | Find a transaction on the distributed ledger by its sequence number.
:param seq_no: transaction number
:return: json sequence number of transaction, null for no match | [
"Find",
"a",
"transaction",
"on",
"the",
"distributed",
"ledger",
"by",
"its",
"sequence",
"number",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/base.py#L847-L864 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/a2a/service.py | Service.to_dict | def to_dict(self):
"""
Return dict representation of service to embed in DID document.
"""
rv = {
'id': self.id,
'type': self.type,
'priority': self.priority
}
if self.recip_keys:
rv['routingKeys'] = [canon_ref(k.did, k.id,... | python | def to_dict(self):
"""
Return dict representation of service to embed in DID document.
"""
rv = {
'id': self.id,
'type': self.type,
'priority': self.priority
}
if self.recip_keys:
rv['routingKeys'] = [canon_ref(k.did, k.id,... | [
"def",
"to_dict",
"(",
"self",
")",
":",
"rv",
"=",
"{",
"'id'",
":",
"self",
".",
"id",
",",
"'type'",
":",
"self",
".",
"type",
",",
"'priority'",
":",
"self",
".",
"priority",
"}",
"if",
"self",
".",
"recip_keys",
":",
"rv",
"[",
"'routingKeys'"... | Return dict representation of service to embed in DID document. | [
"Return",
"dict",
"representation",
"of",
"service",
"to",
"embed",
"in",
"DID",
"document",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/a2a/service.py#L131-L147 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver._assert_link_secret | async def _assert_link_secret(self, action: str) -> str:
"""
Return current wallet link secret label. Raise AbsentLinkSecret if link secret is not set.
:param action: action requiring link secret
"""
rv = await self.wallet.get_link_secret_label()
if rv is None:
... | python | async def _assert_link_secret(self, action: str) -> str:
"""
Return current wallet link secret label. Raise AbsentLinkSecret if link secret is not set.
:param action: action requiring link secret
"""
rv = await self.wallet.get_link_secret_label()
if rv is None:
... | [
"async",
"def",
"_assert_link_secret",
"(",
"self",
",",
"action",
":",
"str",
")",
"->",
"str",
":",
"rv",
"=",
"await",
"self",
".",
"wallet",
".",
"get_link_secret_label",
"(",
")",
"if",
"rv",
"is",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Holde... | Return current wallet link secret label. Raise AbsentLinkSecret if link secret is not set.
:param action: action requiring link secret | [
"Return",
"current",
"wallet",
"link",
"secret",
"label",
".",
"Raise",
"AbsentLinkSecret",
"if",
"link",
"secret",
"is",
"not",
"set",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L104-L116 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver._sync_revoc_for_proof | async def _sync_revoc_for_proof(self, rr_id: str) -> None:
"""
Pick up tails file reader handle for input revocation registry identifier. If no symbolic
link is present, get the revocation registry definition to retrieve its tails file hash,
then find the tails file and link it.
... | python | async def _sync_revoc_for_proof(self, rr_id: str) -> None:
"""
Pick up tails file reader handle for input revocation registry identifier. If no symbolic
link is present, get the revocation registry definition to retrieve its tails file hash,
then find the tails file and link it.
... | [
"async",
"def",
"_sync_revoc_for_proof",
"(",
"self",
",",
"rr_id",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver._sync_revoc_for_proof >>> rr_id: %s'",
",",
"rr_id",
")",
"if",
"not",
"ok_rev_reg_id",
"(",
"rr_id",
")",
":",
... | Pick up tails file reader handle for input revocation registry identifier. If no symbolic
link is present, get the revocation registry definition to retrieve its tails file hash,
then find the tails file and link it.
Raise AbsentTails for missing corresponding tails file.
:param rr_id... | [
"Pick",
"up",
"tails",
"file",
"reader",
"handle",
"for",
"input",
"revocation",
"registry",
"identifier",
".",
"If",
"no",
"symbolic",
"link",
"is",
"present",
"get",
"the",
"revocation",
"registry",
"definition",
"to",
"retrieve",
"its",
"tails",
"file",
"ha... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L149-L199 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.dir_tails | def dir_tails(self, rr_id: str) -> str:
"""
Return path to the correct directory for the tails file on input revocation registry identifier.
:param rr_id: revocation registry identifier of interest
:return: path to tails dir for input revocation registry identifier
"""
... | python | def dir_tails(self, rr_id: str) -> str:
"""
Return path to the correct directory for the tails file on input revocation registry identifier.
:param rr_id: revocation registry identifier of interest
:return: path to tails dir for input revocation registry identifier
"""
... | [
"def",
"dir_tails",
"(",
"self",
",",
"rr_id",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.dir_tails >>>'",
")",
"if",
"not",
"ok_rev_reg_id",
"(",
"rr_id",
")",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.dir_tails <!... | Return path to the correct directory for the tails file on input revocation registry identifier.
:param rr_id: revocation registry identifier of interest
:return: path to tails dir for input revocation registry identifier | [
"Return",
"path",
"to",
"the",
"correct",
"directory",
"for",
"the",
"tails",
"file",
"on",
"input",
"revocation",
"registry",
"identifier",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L257-L273 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.open | async def open(self) -> 'HolderProver':
"""
Explicit entry. Perform ancestor opening operations,
then parse cache from archive if so configured, and
synchronize revocation registry to tails tree content.
:return: current object
"""
LOGGER.debug('HolderProver.ope... | python | async def open(self) -> 'HolderProver':
"""
Explicit entry. Perform ancestor opening operations,
then parse cache from archive if so configured, and
synchronize revocation registry to tails tree content.
:return: current object
"""
LOGGER.debug('HolderProver.ope... | [
"async",
"def",
"open",
"(",
"self",
")",
"->",
"'HolderProver'",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.open >>>'",
")",
"await",
"super",
"(",
")",
".",
"open",
"(",
")",
"if",
"self",
".",
"config",
".",
"get",
"(",
"'parse-caches-on-open'",
... | Explicit entry. Perform ancestor opening operations,
then parse cache from archive if so configured, and
synchronize revocation registry to tails tree content.
:return: current object | [
"Explicit",
"entry",
".",
"Perform",
"ancestor",
"opening",
"operations",
"then",
"parse",
"cache",
"from",
"archive",
"if",
"so",
"configured",
"and",
"synchronize",
"revocation",
"registry",
"to",
"tails",
"tree",
"content",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L275-L294 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.close | async def close(self) -> None:
"""
Explicit exit. If so configured, populate cache to prove all creds in
wallet offline if need be, archive cache, and purge prior cache archives.
:return: current object
"""
LOGGER.debug('HolderProver.close >>>')
if self.config.... | python | async def close(self) -> None:
"""
Explicit exit. If so configured, populate cache to prove all creds in
wallet offline if need be, archive cache, and purge prior cache archives.
:return: current object
"""
LOGGER.debug('HolderProver.close >>>')
if self.config.... | [
"async",
"def",
"close",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.close >>>'",
")",
"if",
"self",
".",
"config",
".",
"get",
"(",
"'archive-holder-prover-caches-on-close'",
",",
"False",
")",
":",
"await",
"self",
".",... | Explicit exit. If so configured, populate cache to prove all creds in
wallet offline if need be, archive cache, and purge prior cache archives.
:return: current object | [
"Explicit",
"exit",
".",
"If",
"so",
"configured",
"populate",
"cache",
"to",
"prove",
"all",
"creds",
"in",
"wallet",
"offline",
"if",
"need",
"be",
"archive",
"cache",
"and",
"purge",
"prior",
"cache",
"archives",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L296-L318 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.rev_regs | async def rev_regs(self) -> list:
"""
Return list of revocation registry identifiers for which HolderProver has associated tails files.
The operation creates associations for any (newly copied, via service wrapper API) tails files without.
:return: list of revocation registry identifier... | python | async def rev_regs(self) -> list:
"""
Return list of revocation registry identifiers for which HolderProver has associated tails files.
The operation creates associations for any (newly copied, via service wrapper API) tails files without.
:return: list of revocation registry identifier... | [
"async",
"def",
"rev_regs",
"(",
"self",
")",
"->",
"list",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.rev_regs >>>'",
")",
"for",
"path_rr_id",
"in",
"Tails",
".",
"links",
"(",
"self",
".",
"_dir_tails",
")",
":",
"await",
"self",
".",
"_sync_revoc... | Return list of revocation registry identifiers for which HolderProver has associated tails files.
The operation creates associations for any (newly copied, via service wrapper API) tails files without.
:return: list of revocation registry identifiers for which HolderProver has associated tails files | [
"Return",
"list",
"of",
"revocation",
"registry",
"identifiers",
"for",
"which",
"HolderProver",
"has",
"associated",
"tails",
"files",
".",
"The",
"operation",
"creates",
"associations",
"for",
"any",
"(",
"newly",
"copied",
"via",
"service",
"wrapper",
"API",
... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L320-L335 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.offline_intervals | async def offline_intervals(self, cd_ids: Union[str, Sequence[str]]) -> dict:
"""
Return default non-revocation intervals for input cred def ids, based on content of revocation cache,
for augmentation into specification for Verifier.build_proof_req_json. Note that the close() call
to set... | python | async def offline_intervals(self, cd_ids: Union[str, Sequence[str]]) -> dict:
"""
Return default non-revocation intervals for input cred def ids, based on content of revocation cache,
for augmentation into specification for Verifier.build_proof_req_json. Note that the close() call
to set... | [
"async",
"def",
"offline_intervals",
"(",
"self",
",",
"cd_ids",
":",
"Union",
"[",
"str",
",",
"Sequence",
"[",
"str",
"]",
"]",
")",
"->",
"dict",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.offline_intervals >>> cd_ids: %s'",
",",
"cd_ids",
")",
"rv"... | Return default non-revocation intervals for input cred def ids, based on content of revocation cache,
for augmentation into specification for Verifier.build_proof_req_json. Note that the close() call
to set the anchor off-line extends all revocation cache registry delta entries to its time of execution:... | [
"Return",
"default",
"non",
"-",
"revocation",
"intervals",
"for",
"input",
"cred",
"def",
"ids",
"based",
"on",
"content",
"of",
"revocation",
"cache",
"for",
"augmentation",
"into",
"specification",
"for",
"Verifier",
".",
"build_proof_req_json",
".",
"Note",
... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L337-L396 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.create_link_secret | async def create_link_secret(self, label: str) -> None:
"""
Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError caus... | python | async def create_link_secret(self, label: str) -> None:
"""
Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError caus... | [
"async",
"def",
"create_link_secret",
"(",
"self",
",",
"label",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.create_link_secret >>> label: %s'",
",",
"label",
")",
"await",
"self",
".",
"wallet",
".",
"create_link_secret",
"("... | Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError causing failure
to set link secret in wallet.
:param label: lab... | [
"Create",
"link",
"secret",
"(",
"a",
".",
"k",
".",
"a",
".",
"master",
"secret",
")",
"used",
"in",
"proofs",
"by",
"HolderProver",
"if",
"the",
"current",
"link",
"secret",
"does",
"not",
"already",
"correspond",
"to",
"the",
"input",
"link",
"secret"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L398-L413 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.store_cred | async def store_cred(self, cred_json: str, cred_req_metadata_json: str) -> str:
"""
Store cred in wallet as HolderProver, return its credential identifier as created in wallet.
Raise AbsentTails if tails file not available for revocation registry for input credential.
Raise WalletState ... | python | async def store_cred(self, cred_json: str, cred_req_metadata_json: str) -> str:
"""
Store cred in wallet as HolderProver, return its credential identifier as created in wallet.
Raise AbsentTails if tails file not available for revocation registry for input credential.
Raise WalletState ... | [
"async",
"def",
"store_cred",
"(",
"self",
",",
"cred_json",
":",
"str",
",",
"cred_req_metadata_json",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.store_cred >>> cred_json: %s, cred_req_metadata_json: %s'",
",",
"cred_json",
",",
... | Store cred in wallet as HolderProver, return its credential identifier as created in wallet.
Raise AbsentTails if tails file not available for revocation registry for input credential.
Raise WalletState if wallet is closed.
:param cred_json: credential json as HolderProver created
:par... | [
"Store",
"cred",
"in",
"wallet",
"as",
"HolderProver",
"return",
"its",
"credential",
"identifier",
"as",
"created",
"in",
"wallet",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L459-L497 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.load_cache_for_proof | async def load_cache_for_proof(self, archive: bool = False) -> int:
"""
Load schema, cred def, revocation caches; optionally archive enough to go
offline and be able to generate proof on all credentials in wallet.
Return timestamp (epoch seconds) of cache load event, also used as subdir... | python | async def load_cache_for_proof(self, archive: bool = False) -> int:
"""
Load schema, cred def, revocation caches; optionally archive enough to go
offline and be able to generate proof on all credentials in wallet.
Return timestamp (epoch seconds) of cache load event, also used as subdir... | [
"async",
"def",
"load_cache_for_proof",
"(",
"self",
",",
"archive",
":",
"bool",
"=",
"False",
")",
"->",
"int",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.load_cache_for_proof >>> archive: %s'",
",",
"archive",
")",
"rv",
"=",
"int",
"(",
"time",
"(",
... | Load schema, cred def, revocation caches; optionally archive enough to go
offline and be able to generate proof on all credentials in wallet.
Return timestamp (epoch seconds) of cache load event, also used as subdirectory
for cache archives.
:param archive: True to archive now or False... | [
"Load",
"schema",
"cred",
"def",
"revocation",
"caches",
";",
"optionally",
"archive",
"enough",
"to",
"go",
"offline",
"and",
"be",
"able",
"to",
"generate",
"proof",
"on",
"all",
"credentials",
"in",
"wallet",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L499-L546 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.get_box_ids_held | async def get_box_ids_held(self) -> str:
"""
Return json object on lists of all unique box identifiers for credentials in wallet, as
evidenced by tails directory content:
* schema identifiers
* credential definition identifiers
* revocation registry identifiers.
... | python | async def get_box_ids_held(self) -> str:
"""
Return json object on lists of all unique box identifiers for credentials in wallet, as
evidenced by tails directory content:
* schema identifiers
* credential definition identifiers
* revocation registry identifiers.
... | [
"async",
"def",
"get_box_ids_held",
"(",
"self",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.get_box_ids_held >>>'",
")",
"if",
"not",
"self",
".",
"wallet",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.get_box_ids_held ... | Return json object on lists of all unique box identifiers for credentials in wallet, as
evidenced by tails directory content:
* schema identifiers
* credential definition identifiers
* revocation registry identifiers.
E.g.,
::
{
"schema_id"... | [
"Return",
"json",
"object",
"on",
"lists",
"of",
"all",
"unique",
"box",
"identifiers",
"for",
"credentials",
"in",
"wallet",
"as",
"evidenced",
"by",
"tails",
"directory",
"content",
":"
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L548-L625 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.get_cred_infos_by_q | async def get_cred_infos_by_q(self, query_json: str, limit: int = None) -> str:
"""
A cred-info aggregates:
* its wallet cred-id (aka wallet referent)
* its attribute names and values
* its schema identifier
* its credential definition identifier
* its revocation ... | python | async def get_cred_infos_by_q(self, query_json: str, limit: int = None) -> str:
"""
A cred-info aggregates:
* its wallet cred-id (aka wallet referent)
* its attribute names and values
* its schema identifier
* its credential definition identifier
* its revocation ... | [
"async",
"def",
"get_cred_infos_by_q",
"(",
"self",
",",
"query_json",
":",
"str",
",",
"limit",
":",
"int",
"=",
"None",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.get_cred_infos_by_q >>> query_json: %s, limit: %s'",
",",
"query_json",
","... | A cred-info aggregates:
* its wallet cred-id (aka wallet referent)
* its attribute names and values
* its schema identifier
* its credential definition identifier
* its revocation registry identifier
* its credential revocation identifier.
Return list of cred-inf... | [
"A",
"cred",
"-",
"info",
"aggregates",
":",
"*",
"its",
"wallet",
"cred",
"-",
"id",
"(",
"aka",
"wallet",
"referent",
")",
"*",
"its",
"attribute",
"names",
"and",
"values",
"*",
"its",
"schema",
"identifier",
"*",
"its",
"credential",
"definition",
"i... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L627-L718 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.get_cred_infos_by_filter | async def get_cred_infos_by_filter(self, filt: dict = None) -> str:
"""
Return cred-info (json list) from wallet by input filter for
schema identifier and/or credential definition identifier components;
return info of all credentials for no filter.
Raise WalletState if the walle... | python | async def get_cred_infos_by_filter(self, filt: dict = None) -> str:
"""
Return cred-info (json list) from wallet by input filter for
schema identifier and/or credential definition identifier components;
return info of all credentials for no filter.
Raise WalletState if the walle... | [
"async",
"def",
"get_cred_infos_by_filter",
"(",
"self",
",",
"filt",
":",
"dict",
"=",
"None",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.get_cred_infos_by_filter >>> filt: %s'",
",",
"filt",
")",
"if",
"not",
"self",
".",
"wallet",
".... | Return cred-info (json list) from wallet by input filter for
schema identifier and/or credential definition identifier components;
return info of all credentials for no filter.
Raise WalletState if the wallet is closed.
:param filt: indy-sdk filter for credentials; i.e.,
::
... | [
"Return",
"cred",
"-",
"info",
"(",
"json",
"list",
")",
"from",
"wallet",
"by",
"input",
"filter",
"for",
"schema",
"identifier",
"and",
"/",
"or",
"credential",
"definition",
"identifier",
"components",
";",
"return",
"info",
"of",
"all",
"credentials",
"f... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L720-L771 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.get_cred_info_by_id | async def get_cred_info_by_id(self, cred_id: str) -> str:
"""
Return cred-info json from wallet by wallet credential identifier.
Raise AbsentCred for no such credential. Raise WalletState if the wallet is closed.
:param cred_id: credential identifier of interest
:return: json w... | python | async def get_cred_info_by_id(self, cred_id: str) -> str:
"""
Return cred-info json from wallet by wallet credential identifier.
Raise AbsentCred for no such credential. Raise WalletState if the wallet is closed.
:param cred_id: credential identifier of interest
:return: json w... | [
"async",
"def",
"get_cred_info_by_id",
"(",
"self",
",",
"cred_id",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.get_cred_info_by_id >>> cred_id: %s'",
",",
"cred_id",
")",
"if",
"not",
"self",
".",
"wallet",
".",
"handle",
":... | Return cred-info json from wallet by wallet credential identifier.
Raise AbsentCred for no such credential. Raise WalletState if the wallet is closed.
:param cred_id: credential identifier of interest
:return: json with cred for input credential identifier
:return: cred-info json; i.e... | [
"Return",
"cred",
"-",
"info",
"json",
"from",
"wallet",
"by",
"wallet",
"credential",
"identifier",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L773-L823 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.get_cred_briefs_by_proof_req_q | async def get_cred_briefs_by_proof_req_q(self, proof_req_json: str, x_queries_json: str = None) -> str:
"""
A cred-brief aggregates a cred-info and a non-revocation interval. A cred-brief-dict maps
wallet cred-ids to their corresponding cred-briefs.
Return json (cred-brief-dict) object ... | python | async def get_cred_briefs_by_proof_req_q(self, proof_req_json: str, x_queries_json: str = None) -> str:
"""
A cred-brief aggregates a cred-info and a non-revocation interval. A cred-brief-dict maps
wallet cred-ids to their corresponding cred-briefs.
Return json (cred-brief-dict) object ... | [
"async",
"def",
"get_cred_briefs_by_proof_req_q",
"(",
"self",
",",
"proof_req_json",
":",
"str",
",",
"x_queries_json",
":",
"str",
"=",
"None",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"(",
"'HolderProver.get_cred_briefs_by_proof_req_q >>> proof_req_json:... | A cred-brief aggregates a cred-info and a non-revocation interval. A cred-brief-dict maps
wallet cred-ids to their corresponding cred-briefs.
Return json (cred-brief-dict) object mapping wallet credential identifiers to cred-briefs by
proof request and WQL queries by proof request referent. Ret... | [
"A",
"cred",
"-",
"brief",
"aggregates",
"a",
"cred",
"-",
"info",
"and",
"a",
"non",
"-",
"revocation",
"interval",
".",
"A",
"cred",
"-",
"brief",
"-",
"dict",
"maps",
"wallet",
"cred",
"-",
"ids",
"to",
"their",
"corresponding",
"cred",
"-",
"briefs... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L825-L976 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.create_proof | async def create_proof(self, proof_req: dict, briefs: Union[dict, Sequence[dict]], requested_creds: dict) -> str:
"""
Create proof as HolderProver.
Raise:
* AbsentLinkSecret if link secret not set
* CredentialFocus on attempt to create proof on no briefs or multiple brie... | python | async def create_proof(self, proof_req: dict, briefs: Union[dict, Sequence[dict]], requested_creds: dict) -> str:
"""
Create proof as HolderProver.
Raise:
* AbsentLinkSecret if link secret not set
* CredentialFocus on attempt to create proof on no briefs or multiple brie... | [
"async",
"def",
"create_proof",
"(",
"self",
",",
"proof_req",
":",
"dict",
",",
"briefs",
":",
"Union",
"[",
"dict",
",",
"Sequence",
"[",
"dict",
"]",
"]",
",",
"requested_creds",
":",
"dict",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'H... | Create proof as HolderProver.
Raise:
* AbsentLinkSecret if link secret not set
* CredentialFocus on attempt to create proof on no briefs or multiple briefs for a credential definition
* AbsentTails if missing required tails file
* | BadRevStateTime if a timestamp... | [
"Create",
"proof",
"as",
"HolderProver",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L979-L1131 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/holderprover.py | HolderProver.reset_wallet | async def reset_wallet(self, seed: str = None) -> Wallet:
"""
Close and delete HolderProver wallet, then create and open a replacement on prior link secret.
Note that this operation effectively destroys private keys for credential definitions. Its
intended use is primarily for testing an... | python | async def reset_wallet(self, seed: str = None) -> Wallet:
"""
Close and delete HolderProver wallet, then create and open a replacement on prior link secret.
Note that this operation effectively destroys private keys for credential definitions. Its
intended use is primarily for testing an... | [
"async",
"def",
"reset_wallet",
"(",
"self",
",",
"seed",
":",
"str",
"=",
"None",
")",
"->",
"Wallet",
":",
"LOGGER",
".",
"debug",
"(",
"'HolderProver.reset_wallet >>>'",
")",
"self",
".",
"wallet",
"=",
"await",
"WalletManager",
"(",
")",
".",
"reset",
... | Close and delete HolderProver wallet, then create and open a replacement on prior link secret.
Note that this operation effectively destroys private keys for credential definitions. Its
intended use is primarily for testing and demonstration.
Raise AbsentLinkSecret if link secret not set. Raise... | [
"Close",
"and",
"delete",
"HolderProver",
"wallet",
"then",
"create",
"and",
"open",
"a",
"replacement",
"on",
"prior",
"link",
"secret",
".",
"Note",
"that",
"this",
"operation",
"effectively",
"destroys",
"private",
"keys",
"for",
"credential",
"definitions",
... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/holderprover.py#L1133-L1151 |
praekelt/django-ultracache | ultracache/monkey.py | my_resolve_lookup | def my_resolve_lookup(self, context):
"""
Performs resolution of a real variable (i.e. not a literal) against the
given context.
As indicated by the method's name, this method is an implementation
detail and shouldn"t be called by external code. Use Variable.resolve()
in... | python | def my_resolve_lookup(self, context):
"""
Performs resolution of a real variable (i.e. not a literal) against the
given context.
As indicated by the method's name, this method is an implementation
detail and shouldn"t be called by external code. Use Variable.resolve()
in... | [
"def",
"my_resolve_lookup",
"(",
"self",
",",
"context",
")",
":",
"current",
"=",
"context",
"try",
":",
"# catch-all for silent variable failures",
"for",
"bit",
"in",
"self",
".",
"lookups",
":",
"try",
":",
"# dictionary lookup",
"current",
"=",
"current",
"... | Performs resolution of a real variable (i.e. not a literal) against the
given context.
As indicated by the method's name, this method is an implementation
detail and shouldn"t be called by external code. Use Variable.resolve()
instead. | [
"Performs",
"resolution",
"of",
"a",
"real",
"variable",
"(",
"i",
".",
"e",
".",
"not",
"a",
"literal",
")",
"against",
"the",
"given",
"context",
"."
] | train | https://github.com/praekelt/django-ultracache/blob/8898f10e50fc8f8d0a4cb7d3fe4d945bf257bd9f/ultracache/monkey.py#L27-L102 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | SchemaCache.index | def index(self) -> dict:
"""
Return dict mapping content sequence numbers to schema keys.
:return: dict mapping sequence numbers to schema keys
"""
LOGGER.debug('SchemaCache.index >>>')
rv = self._seq_no2schema_key
LOGGER.debug('SchemaCache.index <<< %s', rv)
... | python | def index(self) -> dict:
"""
Return dict mapping content sequence numbers to schema keys.
:return: dict mapping sequence numbers to schema keys
"""
LOGGER.debug('SchemaCache.index >>>')
rv = self._seq_no2schema_key
LOGGER.debug('SchemaCache.index <<< %s', rv)
... | [
"def",
"index",
"(",
"self",
")",
"->",
"dict",
":",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.index >>>'",
")",
"rv",
"=",
"self",
".",
"_seq_no2schema_key",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.index <<< %s'",
",",
"rv",
")",
"return",
"rv"
] | Return dict mapping content sequence numbers to schema keys.
:return: dict mapping sequence numbers to schema keys | [
"Return",
"dict",
"mapping",
"content",
"sequence",
"numbers",
"to",
"schema",
"keys",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L141-L152 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | SchemaCache.schema_key_for | def schema_key_for(self, seq_no: int) -> SchemaKey:
"""
Get schema key for schema by sequence number if known, None for no such schema in cache.
:param seq_no: sequence number
:return: corresponding schema key or None
"""
LOGGER.debug('SchemaCache.schema_key_for >>> seq... | python | def schema_key_for(self, seq_no: int) -> SchemaKey:
"""
Get schema key for schema by sequence number if known, None for no such schema in cache.
:param seq_no: sequence number
:return: corresponding schema key or None
"""
LOGGER.debug('SchemaCache.schema_key_for >>> seq... | [
"def",
"schema_key_for",
"(",
"self",
",",
"seq_no",
":",
"int",
")",
"->",
"SchemaKey",
":",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.schema_key_for >>> seq_no: %s'",
",",
"seq_no",
")",
"rv",
"=",
"self",
".",
"_seq_no2schema_key",
".",
"get",
"(",
"seq_no... | Get schema key for schema by sequence number if known, None for no such schema in cache.
:param seq_no: sequence number
:return: corresponding schema key or None | [
"Get",
"schema",
"key",
"for",
"schema",
"by",
"sequence",
"number",
"if",
"known",
"None",
"for",
"no",
"such",
"schema",
"in",
"cache",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L154-L167 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | SchemaCache.schemata | def schemata(self) -> list:
"""
Return list with schemata in cache.
:return: list of schemata
"""
LOGGER.debug('SchemaCache.schemata >>>')
LOGGER.debug('SchemaCache.schemata <<<')
return [self._schema_key2schema[seq_no] for seq_no in self._schema_key2schema] | python | def schemata(self) -> list:
"""
Return list with schemata in cache.
:return: list of schemata
"""
LOGGER.debug('SchemaCache.schemata >>>')
LOGGER.debug('SchemaCache.schemata <<<')
return [self._schema_key2schema[seq_no] for seq_no in self._schema_key2schema] | [
"def",
"schemata",
"(",
"self",
")",
"->",
"list",
":",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.schemata >>>'",
")",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.schemata <<<'",
")",
"return",
"[",
"self",
".",
"_schema_key2schema",
"[",
"seq_no",
"]",
"for",... | Return list with schemata in cache.
:return: list of schemata | [
"Return",
"list",
"with",
"schemata",
"in",
"cache",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L169-L179 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | SchemaCache.clear | def clear(self) -> None:
"""
Clear the cache.
"""
LOGGER.debug('SchemaCache.clear >>>')
self._schema_key2schema = {}
self._seq_no2schema_key = {}
LOGGER.debug('SchemaCache.clear <<<') | python | def clear(self) -> None:
"""
Clear the cache.
"""
LOGGER.debug('SchemaCache.clear >>>')
self._schema_key2schema = {}
self._seq_no2schema_key = {}
LOGGER.debug('SchemaCache.clear <<<') | [
"def",
"clear",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache.clear >>>'",
")",
"self",
".",
"_schema_key2schema",
"=",
"{",
"}",
"self",
".",
"_seq_no2schema_key",
"=",
"{",
"}",
"LOGGER",
".",
"debug",
"(",
"'SchemaCache... | Clear the cache. | [
"Clear",
"the",
"cache",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L204-L214 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | RevoCacheEntry._get_update | async def _get_update(self, rr_builder: Callable, fro: int, to: int, delta: bool) -> (str, int):
"""
Get rev reg delta/state json, and its timestamp on the distributed ledger,
from cached rev reg delta/state frames list or distributed ledger,
updating cache as necessary.
Raise B... | python | async def _get_update(self, rr_builder: Callable, fro: int, to: int, delta: bool) -> (str, int):
"""
Get rev reg delta/state json, and its timestamp on the distributed ledger,
from cached rev reg delta/state frames list or distributed ledger,
updating cache as necessary.
Raise B... | [
"async",
"def",
"_get_update",
"(",
"self",
",",
"rr_builder",
":",
"Callable",
",",
"fro",
":",
"int",
",",
"to",
":",
"int",
",",
"delta",
":",
"bool",
")",
"->",
"(",
"str",
",",
"int",
")",
":",
"LOGGER",
".",
"debug",
"(",
"'RevoCacheEntry.get_u... | Get rev reg delta/state json, and its timestamp on the distributed ledger,
from cached rev reg delta/state frames list or distributed ledger,
updating cache as necessary.
Raise BadRevStateTime if caller asks for a delta/state in the future. Raise ClosedPool
if an update requires the led... | [
"Get",
"rev",
"reg",
"delta",
"/",
"state",
"json",
"and",
"its",
"timestamp",
"on",
"the",
"distributed",
"ledger",
"from",
"cached",
"rev",
"reg",
"delta",
"/",
"state",
"frames",
"list",
"or",
"distributed",
"ledger",
"updating",
"cache",
"as",
"necessary... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L442-L563 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | RevoCacheEntry.get_delta_json | async def get_delta_json(
self,
rr_delta_builder: Callable[['HolderProver', str, int, int, dict], Awaitable[Tuple[str, int]]],
fro: int,
to: int) -> (str, int):
"""
Get rev reg delta json, and its timestamp on the distributed ledger,
from cached re... | python | async def get_delta_json(
self,
rr_delta_builder: Callable[['HolderProver', str, int, int, dict], Awaitable[Tuple[str, int]]],
fro: int,
to: int) -> (str, int):
"""
Get rev reg delta json, and its timestamp on the distributed ledger,
from cached re... | [
"async",
"def",
"get_delta_json",
"(",
"self",
",",
"rr_delta_builder",
":",
"Callable",
"[",
"[",
"'HolderProver'",
",",
"str",
",",
"int",
",",
"int",
",",
"dict",
"]",
",",
"Awaitable",
"[",
"Tuple",
"[",
"str",
",",
"int",
"]",
"]",
"]",
",",
"fr... | Get rev reg delta json, and its timestamp on the distributed ledger,
from cached rev reg delta frames list or distributed ledger,
updating cache as necessary.
Raise BadRevStateTime if caller asks for a delta to the future.
On return of any previously existing rev reg delta frame, alway... | [
"Get",
"rev",
"reg",
"delta",
"json",
"and",
"its",
"timestamp",
"on",
"the",
"distributed",
"ledger",
"from",
"cached",
"rev",
"reg",
"delta",
"frames",
"list",
"or",
"distributed",
"ledger",
"updating",
"cache",
"as",
"necessary",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L565-L594 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | RevoCacheEntry.get_state_json | async def get_state_json(
self,
rr_state_builder: Callable[['Verifier', str, int], Awaitable[Tuple[str, int]]],
fro: int,
to: int) -> (str, int):
"""
Get rev reg state json, and its timestamp on the distributed ledger,
from cached rev reg state fra... | python | async def get_state_json(
self,
rr_state_builder: Callable[['Verifier', str, int], Awaitable[Tuple[str, int]]],
fro: int,
to: int) -> (str, int):
"""
Get rev reg state json, and its timestamp on the distributed ledger,
from cached rev reg state fra... | [
"async",
"def",
"get_state_json",
"(",
"self",
",",
"rr_state_builder",
":",
"Callable",
"[",
"[",
"'Verifier'",
",",
"str",
",",
"int",
"]",
",",
"Awaitable",
"[",
"Tuple",
"[",
"str",
",",
"int",
"]",
"]",
"]",
",",
"fro",
":",
"int",
",",
"to",
... | Get rev reg state json, and its timestamp on the distributed ledger,
from cached rev reg state frames list or distributed ledger,
updating cache as necessary.
Raise BadRevStateTime if caller asks for a state in the future.
On return of any previously existing rev reg state frame, alway... | [
"Get",
"rev",
"reg",
"state",
"json",
"and",
"its",
"timestamp",
"on",
"the",
"distributed",
"ledger",
"from",
"cached",
"rev",
"reg",
"state",
"frames",
"list",
"or",
"distributed",
"ledger",
"updating",
"cache",
"as",
"necessary",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L596-L625 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | ArchivableCaches.clear | def clear() -> None:
"""
Clear all archivable caches in memory.
"""
LOGGER.debug('clear >>>')
with SCHEMA_CACHE.lock:
SCHEMA_CACHE.clear()
with CRED_DEF_CACHE.lock:
CRED_DEF_CACHE.clear()
with REVO_CACHE.lock:
REVO_CACHE.clear... | python | def clear() -> None:
"""
Clear all archivable caches in memory.
"""
LOGGER.debug('clear >>>')
with SCHEMA_CACHE.lock:
SCHEMA_CACHE.clear()
with CRED_DEF_CACHE.lock:
CRED_DEF_CACHE.clear()
with REVO_CACHE.lock:
REVO_CACHE.clear... | [
"def",
"clear",
"(",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'clear >>>'",
")",
"with",
"SCHEMA_CACHE",
".",
"lock",
":",
"SCHEMA_CACHE",
".",
"clear",
"(",
")",
"with",
"CRED_DEF_CACHE",
".",
"lock",
":",
"CRED_DEF_CACHE",
".",
"clear",
"(... | Clear all archivable caches in memory. | [
"Clear",
"all",
"archivable",
"caches",
"in",
"memory",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L756-L770 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | ArchivableCaches.archive | def archive(base_dir: str) -> int:
"""
Archive schema, cred def, revocation caches to disk as json.
:param base_dir: archive base directory
:return: timestamp (epoch seconds) used as subdirectory
"""
LOGGER.debug('archive >>> base_dir: %s', base_dir)
rv = int(t... | python | def archive(base_dir: str) -> int:
"""
Archive schema, cred def, revocation caches to disk as json.
:param base_dir: archive base directory
:return: timestamp (epoch seconds) used as subdirectory
"""
LOGGER.debug('archive >>> base_dir: %s', base_dir)
rv = int(t... | [
"def",
"archive",
"(",
"base_dir",
":",
"str",
")",
"->",
"int",
":",
"LOGGER",
".",
"debug",
"(",
"'archive >>> base_dir: %s'",
",",
"base_dir",
")",
"rv",
"=",
"int",
"(",
"time",
"(",
")",
")",
"timestamp_dir",
"=",
"join",
"(",
"base_dir",
",",
"st... | Archive schema, cred def, revocation caches to disk as json.
:param base_dir: archive base directory
:return: timestamp (epoch seconds) used as subdirectory | [
"Archive",
"schema",
"cred",
"def",
"revocation",
"caches",
"to",
"disk",
"as",
"json",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L773-L807 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/cache.py | ArchivableCaches.purge_archives | def purge_archives(base_dir: str, retain_latest: bool = False) -> None:
"""
Erase all (or nearly all) cache archives.
:param base_dir: archive base directory
:param retain_latest: retain latest archive if present, purge all others
"""
LOGGER.debug('purge_archives >>> ba... | python | def purge_archives(base_dir: str, retain_latest: bool = False) -> None:
"""
Erase all (or nearly all) cache archives.
:param base_dir: archive base directory
:param retain_latest: retain latest archive if present, purge all others
"""
LOGGER.debug('purge_archives >>> ba... | [
"def",
"purge_archives",
"(",
"base_dir",
":",
"str",
",",
"retain_latest",
":",
"bool",
"=",
"False",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'purge_archives >>> base_dir: %s, retain_latest: %s'",
",",
"base_dir",
",",
"retain_latest",
")",
"if",
... | Erase all (or nearly all) cache archives.
:param base_dir: archive base directory
:param retain_latest: retain latest archive if present, purge all others | [
"Erase",
"all",
"(",
"or",
"nearly",
"all",
")",
"cache",
"archives",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/cache.py#L893-L912 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/info.py | pairwise_info2tags | def pairwise_info2tags(pairwise: PairwiseInfo) -> dict:
"""
Given pairwise info with metadata mapping tags to values, return corresponding
indy-sdk non_secrets record tags dict to store same in wallet (via non_secrets)
unencrypted (for WQL search options). Canonicalize metadata values to strings via
... | python | def pairwise_info2tags(pairwise: PairwiseInfo) -> dict:
"""
Given pairwise info with metadata mapping tags to values, return corresponding
indy-sdk non_secrets record tags dict to store same in wallet (via non_secrets)
unencrypted (for WQL search options). Canonicalize metadata values to strings via
... | [
"def",
"pairwise_info2tags",
"(",
"pairwise",
":",
"PairwiseInfo",
")",
"->",
"dict",
":",
"rv",
"=",
"{",
"canon_pairwise_tag",
"(",
"tag",
")",
":",
"raw",
"(",
"pairwise",
".",
"metadata",
"[",
"tag",
"]",
")",
"for",
"tag",
"in",
"pairwise",
".",
"... | Given pairwise info with metadata mapping tags to values, return corresponding
indy-sdk non_secrets record tags dict to store same in wallet (via non_secrets)
unencrypted (for WQL search options). Canonicalize metadata values to strings via
raw() for WQL fitness.
Raise BadRecord if metadata does not c... | [
"Given",
"pairwise",
"info",
"with",
"metadata",
"mapping",
"tags",
"to",
"values",
"return",
"corresponding",
"indy",
"-",
"sdk",
"non_secrets",
"record",
"tags",
"dict",
"to",
"store",
"same",
"in",
"wallet",
"(",
"via",
"non_secrets",
")",
"unencrypted",
"(... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/info.py#L354-L378 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/info.py | storage_record2pairwise_info | def storage_record2pairwise_info(storec: StorageRecord) -> PairwiseInfo:
"""
Given indy-sdk non_secrets implementation of pairwise storage record dict, return corresponding PairwiseInfo.
:param storec: (non-secret) storage record to convert to PairwiseInfo
:return: PairwiseInfo on record DIDs, verkeys,... | python | def storage_record2pairwise_info(storec: StorageRecord) -> PairwiseInfo:
"""
Given indy-sdk non_secrets implementation of pairwise storage record dict, return corresponding PairwiseInfo.
:param storec: (non-secret) storage record to convert to PairwiseInfo
:return: PairwiseInfo on record DIDs, verkeys,... | [
"def",
"storage_record2pairwise_info",
"(",
"storec",
":",
"StorageRecord",
")",
"->",
"PairwiseInfo",
":",
"return",
"PairwiseInfo",
"(",
"storec",
".",
"id",
",",
"# = their did",
"storec",
".",
"value",
",",
"# = their verkey",
"storec",
".",
"tags",
"[",
"'~... | Given indy-sdk non_secrets implementation of pairwise storage record dict, return corresponding PairwiseInfo.
:param storec: (non-secret) storage record to convert to PairwiseInfo
:return: PairwiseInfo on record DIDs, verkeys, metadata | [
"Given",
"indy",
"-",
"sdk",
"non_secrets",
"implementation",
"of",
"pairwise",
"storage",
"record",
"dict",
"return",
"corresponding",
"PairwiseInfo",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/info.py#L381-L396 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager._config2indy | def _config2indy(self, config: dict) -> dict:
"""
Given a configuration dict with indy and possibly more configuration values, return the
corresponding indy wallet configuration dict from current default and input values.
:param config: input configuration
:return: configuration... | python | def _config2indy(self, config: dict) -> dict:
"""
Given a configuration dict with indy and possibly more configuration values, return the
corresponding indy wallet configuration dict from current default and input values.
:param config: input configuration
:return: configuration... | [
"def",
"_config2indy",
"(",
"self",
",",
"config",
":",
"dict",
")",
"->",
"dict",
":",
"assert",
"{",
"'name'",
",",
"'id'",
"}",
"&",
"{",
"k",
"for",
"k",
"in",
"config",
"}",
"return",
"{",
"'id'",
":",
"config",
".",
"get",
"(",
"'name'",
",... | Given a configuration dict with indy and possibly more configuration values, return the
corresponding indy wallet configuration dict from current default and input values.
:param config: input configuration
:return: configuration dict for indy wallet | [
"Given",
"a",
"configuration",
"dict",
"with",
"indy",
"and",
"possibly",
"more",
"configuration",
"values",
"return",
"the",
"corresponding",
"indy",
"wallet",
"configuration",
"dict",
"from",
"current",
"default",
"and",
"input",
"values",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L113-L127 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager._config2von | def _config2von(self, config: dict, access: str = None) -> dict:
"""
Given a configuration dict with indy and possibly more configuration values, return the
corresponding VON wallet configuration dict from current default and input values.
:param config: input configuration
:par... | python | def _config2von(self, config: dict, access: str = None) -> dict:
"""
Given a configuration dict with indy and possibly more configuration values, return the
corresponding VON wallet configuration dict from current default and input values.
:param config: input configuration
:par... | [
"def",
"_config2von",
"(",
"self",
",",
"config",
":",
"dict",
",",
"access",
":",
"str",
"=",
"None",
")",
"->",
"dict",
":",
"rv",
"=",
"{",
"k",
":",
"config",
".",
"get",
"(",
"k",
",",
"self",
".",
"_defaults",
"[",
"k",
"]",
")",
"for",
... | Given a configuration dict with indy and possibly more configuration values, return the
corresponding VON wallet configuration dict from current default and input values.
:param config: input configuration
:param access: access credentials value
:return: configuration dict for VON walle... | [
"Given",
"a",
"configuration",
"dict",
"with",
"indy",
"and",
"possibly",
"more",
"configuration",
"values",
"return",
"the",
"corresponding",
"VON",
"wallet",
"configuration",
"dict",
"from",
"current",
"default",
"and",
"input",
"values",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L129-L144 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.create | async def create(self, config: dict = None, access: str = None, replace: bool = False) -> Wallet:
"""
Create wallet on input name with given configuration and access credential value.
Raise ExtantWallet if wallet on input name exists already and replace parameter is False.
Raise BadAcce... | python | async def create(self, config: dict = None, access: str = None, replace: bool = False) -> Wallet:
"""
Create wallet on input name with given configuration and access credential value.
Raise ExtantWallet if wallet on input name exists already and replace parameter is False.
Raise BadAcce... | [
"async",
"def",
"create",
"(",
"self",
",",
"config",
":",
"dict",
"=",
"None",
",",
"access",
":",
"str",
"=",
"None",
",",
"replace",
":",
"bool",
"=",
"False",
")",
"->",
"Wallet",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.create >>> config %s... | Create wallet on input name with given configuration and access credential value.
Raise ExtantWallet if wallet on input name exists already and replace parameter is False.
Raise BadAccess on replacement for bad access credentials value.
FAIR WARNING: specifying replace=True attempts to remove ... | [
"Create",
"wallet",
"on",
"input",
"name",
"with",
"given",
"configuration",
"and",
"access",
"credential",
"value",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L146-L187 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.get | def get(self, config: dict, access: str = None) -> Wallet:
"""
Instantiate and return VON anchor wallet object on given configuration, respecting wallet manager
default configuration values.
:param config: configuration data for both indy-sdk and VON anchor wallet:
- 'name'... | python | def get(self, config: dict, access: str = None) -> Wallet:
"""
Instantiate and return VON anchor wallet object on given configuration, respecting wallet manager
default configuration values.
:param config: configuration data for both indy-sdk and VON anchor wallet:
- 'name'... | [
"def",
"get",
"(",
"self",
",",
"config",
":",
"dict",
",",
"access",
":",
"str",
"=",
"None",
")",
"->",
"Wallet",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.get >>> config %s, access %s'",
",",
"config",
",",
"access",
")",
"rv",
"=",
"Wallet",
... | Instantiate and return VON anchor wallet object on given configuration, respecting wallet manager
default configuration values.
:param config: configuration data for both indy-sdk and VON anchor wallet:
- 'name' or 'id': wallet name
- 'storage_type': storage type
- ... | [
"Instantiate",
"and",
"return",
"VON",
"anchor",
"wallet",
"object",
"on",
"given",
"configuration",
"respecting",
"wallet",
"manager",
"default",
"configuration",
"values",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L189-L216 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.reseed_local | async def reseed_local(self, local_wallet: Wallet, next_seed: str = None) -> DIDInfo:
"""
Generate and apply new key, in wallet only, for local DID based on input seed (default random).
Raise WalletState if wallet is closed.
Note that this operation does not update the corresponding NYM... | python | async def reseed_local(self, local_wallet: Wallet, next_seed: str = None) -> DIDInfo:
"""
Generate and apply new key, in wallet only, for local DID based on input seed (default random).
Raise WalletState if wallet is closed.
Note that this operation does not update the corresponding NYM... | [
"async",
"def",
"reseed_local",
"(",
"self",
",",
"local_wallet",
":",
"Wallet",
",",
"next_seed",
":",
"str",
"=",
"None",
")",
"->",
"DIDInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.reseed_local >>> local_wallet %s'",
",",
"local_wallet",
")",
"awa... | Generate and apply new key, in wallet only, for local DID based on input seed (default random).
Raise WalletState if wallet is closed.
Note that this operation does not update the corresponding NYM on the ledger: for VON anchors
anchored to the ledger, use von_anchor.BaseAnchor.reseed().
... | [
"Generate",
"and",
"apply",
"new",
"key",
"in",
"wallet",
"only",
"for",
"local",
"DID",
"based",
"on",
"input",
"seed",
"(",
"default",
"random",
")",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L218-L237 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.export_wallet | async def export_wallet(self, von_wallet: Wallet, path: str) -> None:
"""
Export an existing VON anchor wallet. Raise WalletState if wallet is closed.
:param von_wallet: open wallet
:param path: path to which to export wallet
"""
LOGGER.debug('WalletManager.export_walle... | python | async def export_wallet(self, von_wallet: Wallet, path: str) -> None:
"""
Export an existing VON anchor wallet. Raise WalletState if wallet is closed.
:param von_wallet: open wallet
:param path: path to which to export wallet
"""
LOGGER.debug('WalletManager.export_walle... | [
"async",
"def",
"export_wallet",
"(",
"self",
",",
"von_wallet",
":",
"Wallet",
",",
"path",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.export_wallet >>> von_wallet %s, path %s'",
",",
"von_wallet",
",",
"path",
")",
"if",
... | Export an existing VON anchor wallet. Raise WalletState if wallet is closed.
:param von_wallet: open wallet
:param path: path to which to export wallet | [
"Export",
"an",
"existing",
"VON",
"anchor",
"wallet",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L239-L260 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.import_wallet | async def import_wallet(self, indy_config: dict, path: str, access: str = None) -> None:
"""
Import a VON anchor wallet. Raise BadAccess on bad access credential value.
:param indy_config: indy wallet configuration to use, with:
- 'id'
- 'storage_type' (optional)
... | python | async def import_wallet(self, indy_config: dict, path: str, access: str = None) -> None:
"""
Import a VON anchor wallet. Raise BadAccess on bad access credential value.
:param indy_config: indy wallet configuration to use, with:
- 'id'
- 'storage_type' (optional)
... | [
"async",
"def",
"import_wallet",
"(",
"self",
",",
"indy_config",
":",
"dict",
",",
"path",
":",
"str",
",",
"access",
":",
"str",
"=",
"None",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.import_wallet >>> indy_config %s, path: %s'",
"... | Import a VON anchor wallet. Raise BadAccess on bad access credential value.
:param indy_config: indy wallet configuration to use, with:
- 'id'
- 'storage_type' (optional)
- 'storage_config' (optional)
:param path: path from which to import wallet file
:para... | [
"Import",
"a",
"VON",
"anchor",
"wallet",
".",
"Raise",
"BadAccess",
"on",
"bad",
"access",
"credential",
"value",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L262-L295 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.reset | async def reset(self, von_wallet: Wallet, seed: str = None) -> Wallet:
"""
Close and delete (open) VON anchor wallet and then create, open, and return
replacement on current link secret.
Note that this operation effectively destroys private keys for keyed data
structures such as... | python | async def reset(self, von_wallet: Wallet, seed: str = None) -> Wallet:
"""
Close and delete (open) VON anchor wallet and then create, open, and return
replacement on current link secret.
Note that this operation effectively destroys private keys for keyed data
structures such as... | [
"async",
"def",
"reset",
"(",
"self",
",",
"von_wallet",
":",
"Wallet",
",",
"seed",
":",
"str",
"=",
"None",
")",
"->",
"Wallet",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.reset >>> von_wallet %s'",
",",
"von_wallet",
")",
"if",
"not",
"von_wallet",... | Close and delete (open) VON anchor wallet and then create, open, and return
replacement on current link secret.
Note that this operation effectively destroys private keys for keyed data
structures such as credential offers or credential definitions.
Raise WalletState if the wallet is c... | [
"Close",
"and",
"delete",
"(",
"open",
")",
"VON",
"anchor",
"wallet",
"and",
"then",
"create",
"open",
"and",
"return",
"replacement",
"on",
"current",
"link",
"secret",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L297-L336 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.remove | async def remove(self, von_wallet: Wallet) -> None:
"""
Remove serialized wallet if it exists. Raise WalletState if wallet is open.
:param von_wallet: (closed) wallet to remove
"""
LOGGER.debug('WalletManager.remove >>> wallet %s', von_wallet)
await von_wallet.remove()... | python | async def remove(self, von_wallet: Wallet) -> None:
"""
Remove serialized wallet if it exists. Raise WalletState if wallet is open.
:param von_wallet: (closed) wallet to remove
"""
LOGGER.debug('WalletManager.remove >>> wallet %s', von_wallet)
await von_wallet.remove()... | [
"async",
"def",
"remove",
"(",
"self",
",",
"von_wallet",
":",
"Wallet",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.remove >>> wallet %s'",
",",
"von_wallet",
")",
"await",
"von_wallet",
".",
"remove",
"(",
")",
"LOGGER",
".",
"debu... | Remove serialized wallet if it exists. Raise WalletState if wallet is open.
:param von_wallet: (closed) wallet to remove | [
"Remove",
"serialized",
"wallet",
"if",
"it",
"exists",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"open",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L338-L349 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/manager.py | WalletManager.register_storage_library | async def register_storage_library(storage_type: str, c_library: str, entry_point: str) -> None:
"""
Load a wallet storage plug-in.
An indy-sdk wallet storage plug-in is a shared library; relying parties must explicitly
load it before creating or opening a wallet with the plug-in.
... | python | async def register_storage_library(storage_type: str, c_library: str, entry_point: str) -> None:
"""
Load a wallet storage plug-in.
An indy-sdk wallet storage plug-in is a shared library; relying parties must explicitly
load it before creating or opening a wallet with the plug-in.
... | [
"async",
"def",
"register_storage_library",
"(",
"storage_type",
":",
"str",
",",
"c_library",
":",
"str",
",",
"entry_point",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'WalletManager.register_storage_library >>> storage_type %s, c_library %s, en... | Load a wallet storage plug-in.
An indy-sdk wallet storage plug-in is a shared library; relying parties must explicitly
load it before creating or opening a wallet with the plug-in.
The implementation loads a dynamic library and calls an entry point; internally,
the plug-in calls the in... | [
"Load",
"a",
"wallet",
"storage",
"plug",
"-",
"in",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/manager.py#L352-L392 |
praekelt/django-ultracache | ultracache/signals.py | on_post_save | def on_post_save(sender, **kwargs):
"""Expire ultracache cache keys affected by this object
"""
if not invalidate:
return
if kwargs.get("raw", False):
return
if sender is MigrationRecorder.Migration:
return
if issubclass(sender, Model):
obj = kwargs["instance"]
... | python | def on_post_save(sender, **kwargs):
"""Expire ultracache cache keys affected by this object
"""
if not invalidate:
return
if kwargs.get("raw", False):
return
if sender is MigrationRecorder.Migration:
return
if issubclass(sender, Model):
obj = kwargs["instance"]
... | [
"def",
"on_post_save",
"(",
"sender",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"invalidate",
":",
"return",
"if",
"kwargs",
".",
"get",
"(",
"\"raw\"",
",",
"False",
")",
":",
"return",
"if",
"sender",
"is",
"MigrationRecorder",
".",
"Migration",
... | Expire ultracache cache keys affected by this object | [
"Expire",
"ultracache",
"cache",
"keys",
"affected",
"by",
"this",
"object"
] | train | https://github.com/praekelt/django-ultracache/blob/8898f10e50fc8f8d0a4cb7d3fe4d945bf257bd9f/ultracache/signals.py#L28-L85 |
praekelt/django-ultracache | ultracache/signals.py | on_post_delete | def on_post_delete(sender, **kwargs):
"""Expire ultracache cache keys affected by this object
"""
if not invalidate:
return
if kwargs.get("raw", False):
return
if sender is MigrationRecorder.Migration:
return
if issubclass(sender, Model):
obj = kwargs["instance"]
... | python | def on_post_delete(sender, **kwargs):
"""Expire ultracache cache keys affected by this object
"""
if not invalidate:
return
if kwargs.get("raw", False):
return
if sender is MigrationRecorder.Migration:
return
if issubclass(sender, Model):
obj = kwargs["instance"]
... | [
"def",
"on_post_delete",
"(",
"sender",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"invalidate",
":",
"return",
"if",
"kwargs",
".",
"get",
"(",
"\"raw\"",
",",
"False",
")",
":",
"return",
"if",
"sender",
"is",
"MigrationRecorder",
".",
"Migration"... | Expire ultracache cache keys affected by this object | [
"Expire",
"ultracache",
"cache",
"keys",
"affected",
"by",
"this",
"object"
] | train | https://github.com/praekelt/django-ultracache/blob/8898f10e50fc8f8d0a4cb7d3fe4d945bf257bd9f/ultracache/signals.py#L89-L125 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.create_signing_key | async def create_signing_key(self, seed: str = None, metadata: dict = None) -> KeyInfo:
"""
Create a new signing key pair.
Raise WalletState if wallet is closed, ExtantRecord if verification key already exists.
:param seed: optional seed allowing deterministic key creation
:par... | python | async def create_signing_key(self, seed: str = None, metadata: dict = None) -> KeyInfo:
"""
Create a new signing key pair.
Raise WalletState if wallet is closed, ExtantRecord if verification key already exists.
:param seed: optional seed allowing deterministic key creation
:par... | [
"async",
"def",
"create_signing_key",
"(",
"self",
",",
"seed",
":",
"str",
"=",
"None",
",",
"metadata",
":",
"dict",
"=",
"None",
")",
"->",
"KeyInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.create_signing_key >>> seed: [SEED], metadata: %s'",
",",
"metada... | Create a new signing key pair.
Raise WalletState if wallet is closed, ExtantRecord if verification key already exists.
:param seed: optional seed allowing deterministic key creation
:param metadata: optional metadata to store with key pair
:return: KeyInfo for new key pair | [
"Create",
"a",
"new",
"signing",
"key",
"pair",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L233-L263 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_signing_key | async def get_signing_key(self, verkey: str) -> KeyInfo:
"""
Get signing key pair for input verification key.
Raise WalletState if wallet is closed, AbsentRecord for no such key pair.
:param verkey: verification key of key pair
:return: KeyInfo for key pair
"""
... | python | async def get_signing_key(self, verkey: str) -> KeyInfo:
"""
Get signing key pair for input verification key.
Raise WalletState if wallet is closed, AbsentRecord for no such key pair.
:param verkey: verification key of key pair
:return: KeyInfo for key pair
"""
... | [
"async",
"def",
"get_signing_key",
"(",
"self",
",",
"verkey",
":",
"str",
")",
"->",
"KeyInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_signing_key >>> seed: [SEED], verkey: %s'",
",",
"verkey",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
"... | Get signing key pair for input verification key.
Raise WalletState if wallet is closed, AbsentRecord for no such key pair.
:param verkey: verification key of key pair
:return: KeyInfo for key pair | [
"Get",
"signing",
"key",
"pair",
"for",
"input",
"verification",
"key",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L265-L292 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.create_local_did | async def create_local_did(self, seed: str = None, loc_did: str = None, metadata: dict = None) -> DIDInfo:
"""
Create and store a new local DID for use in pairwise DID relations.
:param seed: seed from which to create (default random)
:param loc_did: local DID value (default None to let... | python | async def create_local_did(self, seed: str = None, loc_did: str = None, metadata: dict = None) -> DIDInfo:
"""
Create and store a new local DID for use in pairwise DID relations.
:param seed: seed from which to create (default random)
:param loc_did: local DID value (default None to let... | [
"async",
"def",
"create_local_did",
"(",
"self",
",",
"seed",
":",
"str",
"=",
"None",
",",
"loc_did",
":",
"str",
"=",
"None",
",",
"metadata",
":",
"dict",
"=",
"None",
")",
"->",
"DIDInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.create_local_did >... | Create and store a new local DID for use in pairwise DID relations.
:param seed: seed from which to create (default random)
:param loc_did: local DID value (default None to let indy-sdk generate)
:param metadata: metadata to associate with the local DID
(operation always sets 'since... | [
"Create",
"and",
"store",
"a",
"new",
"local",
"DID",
"for",
"use",
"in",
"pairwise",
"DID",
"relations",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L329-L368 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.replace_local_did_metadata | async def replace_local_did_metadata(self, loc_did: str, metadata: dict) -> DIDInfo:
"""
Replace the metadata associated with a local DID.
Raise WalletState if wallet is closed, AbsentRecord for no such local DID.
:param loc_did: local DID of interest
:param metadata: new metad... | python | async def replace_local_did_metadata(self, loc_did: str, metadata: dict) -> DIDInfo:
"""
Replace the metadata associated with a local DID.
Raise WalletState if wallet is closed, AbsentRecord for no such local DID.
:param loc_did: local DID of interest
:param metadata: new metad... | [
"async",
"def",
"replace_local_did_metadata",
"(",
"self",
",",
"loc_did",
":",
"str",
",",
"metadata",
":",
"dict",
")",
"->",
"DIDInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.replace_local_did_metadata >>> loc_did: %s, metadata: %s'",
",",
"loc_did",
",",
"me... | Replace the metadata associated with a local DID.
Raise WalletState if wallet is closed, AbsentRecord for no such local DID.
:param loc_did: local DID of interest
:param metadata: new metadata to store
:return: DIDInfo for local DID after write | [
"Replace",
"the",
"metadata",
"associated",
"with",
"a",
"local",
"DID",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L370-L394 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_local_dids | async def get_local_dids(self) -> Sequence[DIDInfo]:
"""
Get list of DIDInfos for local DIDs.
:return: list of local DIDInfos
"""
LOGGER.debug('Wallet.get_local_dids >>>')
dids_with_meta = json.loads(did.list_my_dids_with_meta(self.handle)) # list
rv = []
... | python | async def get_local_dids(self) -> Sequence[DIDInfo]:
"""
Get list of DIDInfos for local DIDs.
:return: list of local DIDInfos
"""
LOGGER.debug('Wallet.get_local_dids >>>')
dids_with_meta = json.loads(did.list_my_dids_with_meta(self.handle)) # list
rv = []
... | [
"async",
"def",
"get_local_dids",
"(",
"self",
")",
"->",
"Sequence",
"[",
"DIDInfo",
"]",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_local_dids >>>'",
")",
"dids_with_meta",
"=",
"json",
".",
"loads",
"(",
"did",
".",
"list_my_dids_with_meta",
"(",
"self"... | Get list of DIDInfos for local DIDs.
:return: list of local DIDInfos | [
"Get",
"list",
"of",
"DIDInfos",
"for",
"local",
"DIDs",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L396-L415 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_local_did | async def get_local_did(self, loc: str) -> DIDInfo:
"""
Get local DID info by local DID or verification key.
Raise AbsentRecord for no such local DID.
:param loc: DID or verification key of interest
:return: DIDInfo for local DID
"""
LOGGER.debug('Wallet.get_loc... | python | async def get_local_did(self, loc: str) -> DIDInfo:
"""
Get local DID info by local DID or verification key.
Raise AbsentRecord for no such local DID.
:param loc: DID or verification key of interest
:return: DIDInfo for local DID
"""
LOGGER.debug('Wallet.get_loc... | [
"async",
"def",
"get_local_did",
"(",
"self",
",",
"loc",
":",
"str",
")",
"->",
"DIDInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_local_did >>> loc: %s'",
",",
"loc",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'W... | Get local DID info by local DID or verification key.
Raise AbsentRecord for no such local DID.
:param loc: DID or verification key of interest
:return: DIDInfo for local DID | [
"Get",
"local",
"DID",
"info",
"by",
"local",
"DID",
"or",
"verification",
"key",
".",
"Raise",
"AbsentRecord",
"for",
"no",
"such",
"local",
"DID",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L417-L460 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_anchor_did | async def get_anchor_did(self) -> str:
"""
Get current anchor DID by metadata, None for not yet set.
:return: DID
"""
LOGGER.debug('Wallet.get_anchor_did >>>')
if not self.handle:
LOGGER.debug('Wallet.get_anchor_did <!< Wallet %s is closed', self.name)
... | python | async def get_anchor_did(self) -> str:
"""
Get current anchor DID by metadata, None for not yet set.
:return: DID
"""
LOGGER.debug('Wallet.get_anchor_did >>>')
if not self.handle:
LOGGER.debug('Wallet.get_anchor_did <!< Wallet %s is closed', self.name)
... | [
"async",
"def",
"get_anchor_did",
"(",
"self",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_anchor_did >>>'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_anchor_did <!< Wallet %s is closed'",
",",
"... | Get current anchor DID by metadata, None for not yet set.
:return: DID | [
"Get",
"current",
"anchor",
"DID",
"by",
"metadata",
"None",
"for",
"not",
"yet",
"set",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L462-L490 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.create_link_secret | async def create_link_secret(self, label: str) -> None:
"""
Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError caus... | python | async def create_link_secret(self, label: str) -> None:
"""
Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError caus... | [
"async",
"def",
"create_link_secret",
"(",
"self",
",",
"label",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.create_link_secret >>> label: %s'",
",",
"label",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",... | Create link secret (a.k.a. master secret) used in proofs by HolderProver, if the
current link secret does not already correspond to the input link secret label.
Raise WalletState if wallet is closed, or any other IndyError causing failure
to set link secret in wallet.
:param label: lab... | [
"Create",
"link",
"secret",
"(",
"a",
".",
"k",
".",
"a",
".",
"master",
"secret",
")",
"used",
"in",
"proofs",
"by",
"HolderProver",
"if",
"the",
"current",
"link",
"secret",
"does",
"not",
"already",
"correspond",
"to",
"the",
"input",
"link",
"secret"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L492-L524 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet._write_link_secret_label | async def _write_link_secret_label(self, label) -> None:
"""
Update non-secret storage record with link secret label.
:param label: link secret label
"""
LOGGER.debug('Wallet._write_link_secret_label <<< %s', label)
if await self.get_link_secret_label() == label:
... | python | async def _write_link_secret_label(self, label) -> None:
"""
Update non-secret storage record with link secret label.
:param label: link secret label
"""
LOGGER.debug('Wallet._write_link_secret_label <<< %s', label)
if await self.get_link_secret_label() == label:
... | [
"async",
"def",
"_write_link_secret_label",
"(",
"self",
",",
"label",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet._write_link_secret_label <<< %s'",
",",
"label",
")",
"if",
"await",
"self",
".",
"get_link_secret_label",
"(",
")",
"==",
"label... | Update non-secret storage record with link secret label.
:param label: link secret label | [
"Update",
"non",
"-",
"secret",
"storage",
"record",
"with",
"link",
"secret",
"label",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L526-L544 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_link_secret_label | async def get_link_secret_label(self) -> str:
"""
Get current link secret label from non-secret storage records; return None for no match.
:return: latest non-secret storage record for link secret label
"""
LOGGER.debug('Wallet.get_link_secret_label >>>')
if not self.h... | python | async def get_link_secret_label(self) -> str:
"""
Get current link secret label from non-secret storage records; return None for no match.
:return: latest non-secret storage record for link secret label
"""
LOGGER.debug('Wallet.get_link_secret_label >>>')
if not self.h... | [
"async",
"def",
"get_link_secret_label",
"(",
"self",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_link_secret_label >>>'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_link_secret <!< Wallet %s is close... | Get current link secret label from non-secret storage records; return None for no match.
:return: latest non-secret storage record for link secret label | [
"Get",
"current",
"link",
"secret",
"label",
"from",
"non",
"-",
"secret",
"storage",
"records",
";",
"return",
"None",
"for",
"no",
"match",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L546-L565 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.open | async def open(self) -> 'Wallet':
"""
Explicit entry. Open wallet as configured, for later closure via close().
For use when keeping wallet open across multiple calls.
Raise any IndyError causing failure to open wallet, WalletState if wallet already open,
or AbsentWallet on atte... | python | async def open(self) -> 'Wallet':
"""
Explicit entry. Open wallet as configured, for later closure via close().
For use when keeping wallet open across multiple calls.
Raise any IndyError causing failure to open wallet, WalletState if wallet already open,
or AbsentWallet on atte... | [
"async",
"def",
"open",
"(",
"self",
")",
"->",
"'Wallet'",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.open >>>'",
")",
"created",
"=",
"False",
"while",
"True",
":",
"try",
":",
"self",
".",
"_handle",
"=",
"await",
"wallet",
".",
"open_wallet",
"(",
... | Explicit entry. Open wallet as configured, for later closure via close().
For use when keeping wallet open across multiple calls.
Raise any IndyError causing failure to open wallet, WalletState if wallet already open,
or AbsentWallet on attempt to enter wallet not yet created.
:return:... | [
"Explicit",
"entry",
".",
"Open",
"wallet",
"as",
"configured",
"for",
"later",
"closure",
"via",
"close",
"()",
".",
"For",
"use",
"when",
"keeping",
"wallet",
"open",
"across",
"multiple",
"calls",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L584-L631 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.create | async def create(self) -> None:
"""
Persist the wallet. Raise ExtantWallet if it already exists.
Actuators should prefer WalletManager.create() to calling this method directly - the wallet manager
filters wallet configuration through preset defaults.
"""
LOGGER.debug('W... | python | async def create(self) -> None:
"""
Persist the wallet. Raise ExtantWallet if it already exists.
Actuators should prefer WalletManager.create() to calling this method directly - the wallet manager
filters wallet configuration through preset defaults.
"""
LOGGER.debug('W... | [
"async",
"def",
"create",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.create >>>'",
")",
"try",
":",
"await",
"wallet",
".",
"create_wallet",
"(",
"config",
"=",
"json",
".",
"dumps",
"(",
"self",
".",
"config",
")",
",",... | Persist the wallet. Raise ExtantWallet if it already exists.
Actuators should prefer WalletManager.create() to calling this method directly - the wallet manager
filters wallet configuration through preset defaults. | [
"Persist",
"the",
"wallet",
".",
"Raise",
"ExtantWallet",
"if",
"it",
"already",
"exists",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L633-L671 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.close | async def close(self) -> None:
"""
Explicit exit. Close wallet (and delete if so configured).
"""
LOGGER.debug('Wallet.close >>>')
if not self.handle:
LOGGER.warning('Abstaining from closing wallet %s: already closed', self.name)
else:
LOGGER.deb... | python | async def close(self) -> None:
"""
Explicit exit. Close wallet (and delete if so configured).
"""
LOGGER.debug('Wallet.close >>>')
if not self.handle:
LOGGER.warning('Abstaining from closing wallet %s: already closed', self.name)
else:
LOGGER.deb... | [
"async",
"def",
"close",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.close >>>'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"warning",
"(",
"'Abstaining from closing wallet %s: already closed'",
",",
"self",
".... | Explicit exit. Close wallet (and delete if so configured). | [
"Explicit",
"exit",
".",
"Close",
"wallet",
"(",
"and",
"delete",
"if",
"so",
"configured",
")",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L689-L707 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.remove | async def remove(self) -> bool:
"""
Remove serialized wallet, best effort, if it exists. Return whether wallet absent after operation
(removal successful or else not present a priori).
Raise WalletState if wallet is open.
:return: whether wallet gone from persistent storage
... | python | async def remove(self) -> bool:
"""
Remove serialized wallet, best effort, if it exists. Return whether wallet absent after operation
(removal successful or else not present a priori).
Raise WalletState if wallet is open.
:return: whether wallet gone from persistent storage
... | [
"async",
"def",
"remove",
"(",
"self",
")",
"->",
"bool",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.remove >>>'",
")",
"if",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.remove <!< Wallet %s is open'",
",",
"self",
".",
"name",
")",
"... | Remove serialized wallet, best effort, if it exists. Return whether wallet absent after operation
(removal successful or else not present a priori).
Raise WalletState if wallet is open.
:return: whether wallet gone from persistent storage | [
"Remove",
"serialized",
"wallet",
"best",
"effort",
"if",
"it",
"exists",
".",
"Return",
"whether",
"wallet",
"absent",
"after",
"operation",
"(",
"removal",
"successful",
"or",
"else",
"not",
"present",
"a",
"priori",
")",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L709-L739 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.write_pairwise | async def write_pairwise(
self,
their_did: str,
their_verkey: str = None,
my_did: str = None,
metadata: dict = None,
replace_meta: bool = False) -> PairwiseInfo:
"""
Store a pairwise DID for a secure connection. Use verification key... | python | async def write_pairwise(
self,
their_did: str,
their_verkey: str = None,
my_did: str = None,
metadata: dict = None,
replace_meta: bool = False) -> PairwiseInfo:
"""
Store a pairwise DID for a secure connection. Use verification key... | [
"async",
"def",
"write_pairwise",
"(",
"self",
",",
"their_did",
":",
"str",
",",
"their_verkey",
":",
"str",
"=",
"None",
",",
"my_did",
":",
"str",
"=",
"None",
",",
"metadata",
":",
"dict",
"=",
"None",
",",
"replace_meta",
":",
"bool",
"=",
"False"... | Store a pairwise DID for a secure connection. Use verification key for local DID in wallet if
supplied; otherwise, create one first. If local DID specified but not present, raise AbsentRecord.
With supplied metadata, replace or augment and overwrite any existing metadata for the pairwise
relati... | [
"Store",
"a",
"pairwise",
"DID",
"for",
"a",
"secure",
"connection",
".",
"Use",
"verification",
"key",
"for",
"local",
"DID",
"in",
"wallet",
"if",
"supplied",
";",
"otherwise",
"create",
"one",
"first",
".",
"If",
"local",
"DID",
"specified",
"but",
"not... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L741-L816 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.delete_pairwise | async def delete_pairwise(self, their_did: str) -> None:
"""
Remove a pairwise DID record by its remote DID. Silently return if no such record is present.
Raise WalletState for closed wallet, or BadIdentifier for invalid pairwise DID.
:param their_did: remote DID marking pairwise DID to... | python | async def delete_pairwise(self, their_did: str) -> None:
"""
Remove a pairwise DID record by its remote DID. Silently return if no such record is present.
Raise WalletState for closed wallet, or BadIdentifier for invalid pairwise DID.
:param their_did: remote DID marking pairwise DID to... | [
"async",
"def",
"delete_pairwise",
"(",
"self",
",",
"their_did",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.delete_pairwise >>> their_did: %s'",
",",
"their_did",
")",
"if",
"not",
"ok_did",
"(",
"their_did",
")",
":",
"LOGGER",... | Remove a pairwise DID record by its remote DID. Silently return if no such record is present.
Raise WalletState for closed wallet, or BadIdentifier for invalid pairwise DID.
:param their_did: remote DID marking pairwise DID to remove | [
"Remove",
"a",
"pairwise",
"DID",
"record",
"by",
"its",
"remote",
"DID",
".",
"Silently",
"return",
"if",
"no",
"such",
"record",
"is",
"present",
".",
"Raise",
"WalletState",
"for",
"closed",
"wallet",
"or",
"BadIdentifier",
"for",
"invalid",
"pairwise",
"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L818-L834 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_pairwise | async def get_pairwise(self, pairwise_filt: str = None) -> dict:
"""
Return dict mapping each pairwise DID of interest in wallet to its pairwise info, or,
for no filter specified, mapping them all. If wallet has no such item, return empty dict.
:param pairwise_filt: remote DID of intere... | python | async def get_pairwise(self, pairwise_filt: str = None) -> dict:
"""
Return dict mapping each pairwise DID of interest in wallet to its pairwise info, or,
for no filter specified, mapping them all. If wallet has no such item, return empty dict.
:param pairwise_filt: remote DID of intere... | [
"async",
"def",
"get_pairwise",
"(",
"self",
",",
"pairwise_filt",
":",
"str",
"=",
"None",
")",
"->",
"dict",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.get_pairwise >>> pairwise_filt: %s'",
",",
"pairwise_filt",
")",
"if",
"not",
"self",
".",
"handle",
":",
... | Return dict mapping each pairwise DID of interest in wallet to its pairwise info, or,
for no filter specified, mapping them all. If wallet has no such item, return empty dict.
:param pairwise_filt: remote DID of interest, or WQL json (default all)
:return: dict mapping remote DIDs to PairwiseIn... | [
"Return",
"dict",
"mapping",
"each",
"pairwise",
"DID",
"of",
"interest",
"in",
"wallet",
"to",
"its",
"pairwise",
"info",
"or",
"for",
"no",
"filter",
"specified",
"mapping",
"them",
"all",
".",
"If",
"wallet",
"has",
"no",
"such",
"item",
"return",
"empt... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L836-L858 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.write_non_secret | async def write_non_secret(self, storec: StorageRecord, replace_meta: bool = False) -> StorageRecord:
"""
Add or update non-secret storage record to the wallet; return resulting wallet non-secret record.
:param storec: non-secret storage record
:param replace_meta: whether to replace an... | python | async def write_non_secret(self, storec: StorageRecord, replace_meta: bool = False) -> StorageRecord:
"""
Add or update non-secret storage record to the wallet; return resulting wallet non-secret record.
:param storec: non-secret storage record
:param replace_meta: whether to replace an... | [
"async",
"def",
"write_non_secret",
"(",
"self",
",",
"storec",
":",
"StorageRecord",
",",
"replace_meta",
":",
"bool",
"=",
"False",
")",
"->",
"StorageRecord",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.write_non_secret >>> storec: %s, replace_meta: %s'",
",",
"st... | Add or update non-secret storage record to the wallet; return resulting wallet non-secret record.
:param storec: non-secret storage record
:param replace_meta: whether to replace any existing metadata on matching record or to augment it
:return: non-secret storage record as it appears in the wa... | [
"Add",
"or",
"update",
"non",
"-",
"secret",
"storage",
"record",
"to",
"the",
"wallet",
";",
"return",
"resulting",
"wallet",
"non",
"-",
"secret",
"record",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L860-L930 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.delete_non_secret | async def delete_non_secret(self, typ: str, ident: str) -> None:
"""
Remove a non-secret record by its type and identifier. Silently return if no such record is present.
Raise WalletState for closed wallet.
:param typ: non-secret storage record type
:param ident: non-secret stor... | python | async def delete_non_secret(self, typ: str, ident: str) -> None:
"""
Remove a non-secret record by its type and identifier. Silently return if no such record is present.
Raise WalletState for closed wallet.
:param typ: non-secret storage record type
:param ident: non-secret stor... | [
"async",
"def",
"delete_non_secret",
"(",
"self",
",",
"typ",
":",
"str",
",",
"ident",
":",
"str",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.delete_non_secret >>> typ: %s, ident: %s'",
",",
"typ",
",",
"ident",
")",
"if",
"not",
"self",
... | Remove a non-secret record by its type and identifier. Silently return if no such record is present.
Raise WalletState for closed wallet.
:param typ: non-secret storage record type
:param ident: non-secret storage record identifier | [
"Remove",
"a",
"non",
"-",
"secret",
"record",
"by",
"its",
"type",
"and",
"identifier",
".",
"Silently",
"return",
"if",
"no",
"such",
"record",
"is",
"present",
".",
"Raise",
"WalletState",
"for",
"closed",
"wallet",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L932-L960 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.get_non_secret | async def get_non_secret(
self,
typ: str,
filt: Union[dict, str] = None,
canon_wql: Callable[[dict], dict] = None,
limit: int = None) -> dict:
"""
Return dict mapping each non-secret storage record of interest by identifier or,
for no f... | python | async def get_non_secret(
self,
typ: str,
filt: Union[dict, str] = None,
canon_wql: Callable[[dict], dict] = None,
limit: int = None) -> dict:
"""
Return dict mapping each non-secret storage record of interest by identifier or,
for no f... | [
"async",
"def",
"get_non_secret",
"(",
"self",
",",
"typ",
":",
"str",
",",
"filt",
":",
"Union",
"[",
"dict",
",",
"str",
"]",
"=",
"None",
",",
"canon_wql",
":",
"Callable",
"[",
"[",
"dict",
"]",
",",
"dict",
"]",
"=",
"None",
",",
"limit",
":... | Return dict mapping each non-secret storage record of interest by identifier or,
for no filter specified, mapping them all. If wallet has no such item, return empty dict.
:param typ: non-secret storage record type
:param filt: non-secret storage record identifier or WQL json (default all)
... | [
"Return",
"dict",
"mapping",
"each",
"non",
"-",
"secret",
"storage",
"record",
"of",
"interest",
"by",
"identifier",
"or",
"for",
"no",
"filter",
"specified",
"mapping",
"them",
"all",
".",
"If",
"wallet",
"has",
"no",
"such",
"item",
"return",
"empty",
"... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L962-L1043 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.encrypt | async def encrypt(
self,
message: bytes,
authn: bool = False,
to_verkey: str = None,
from_verkey: str = None) -> bytes:
"""
Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
Raise AbsentMessage for ... | python | async def encrypt(
self,
message: bytes,
authn: bool = False,
to_verkey: str = None,
from_verkey: str = None) -> bytes:
"""
Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
Raise AbsentMessage for ... | [
"async",
"def",
"encrypt",
"(",
"self",
",",
"message",
":",
"bytes",
",",
"authn",
":",
"bool",
"=",
"False",
",",
"to_verkey",
":",
"str",
"=",
"None",
",",
"from_verkey",
":",
"str",
"=",
"None",
")",
"->",
"bytes",
":",
"LOGGER",
".",
"debug",
... | Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
:param message: plaintext, as bytes
:param authn: whether to use authenticated encryption scheme
:param to_verkey: verific... | [
"Encrypt",
"plaintext",
"for",
"owner",
"of",
"DID",
"anonymously",
"or",
"via",
"authenticated",
"encryption",
"scheme",
".",
"Raise",
"AbsentMessage",
"for",
"missing",
"message",
"or",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1045-L1083 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.decrypt | async def decrypt(
self,
ciphertext: bytes,
authn_check: bool = None,
to_verkey: str = None,
from_verkey: str = None) -> (bytes, str):
"""
Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation ... | python | async def decrypt(
self,
ciphertext: bytes,
authn_check: bool = None,
to_verkey: str = None,
from_verkey: str = None) -> (bytes, str):
"""
Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation ... | [
"async",
"def",
"decrypt",
"(",
"self",
",",
"ciphertext",
":",
"bytes",
",",
"authn_check",
":",
"bool",
"=",
"None",
",",
"to_verkey",
":",
"str",
"=",
"None",
",",
"from_verkey",
":",
"str",
"=",
"None",
")",
"->",
"(",
"bytes",
",",
"str",
")",
... | Decrypt ciphertext and optionally authenticate sender.
Raise BadKey if authentication operation checks and reveals sender key distinct from input
sender verification key. Raise AbsentMessage for missing ciphertext, or WalletState if
wallet is closed.
:param ciphertext: ciphertext, as ... | [
"Decrypt",
"ciphertext",
"and",
"optionally",
"authenticate",
"sender",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1085-L1134 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.sign | async def sign(self, message: bytes, verkey: str = None) -> bytes:
"""
Derive signing key and Sign message; return signature. Raise WalletState if wallet is closed.
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
:param message: Content to sign, as bytes
... | python | async def sign(self, message: bytes, verkey: str = None) -> bytes:
"""
Derive signing key and Sign message; return signature. Raise WalletState if wallet is closed.
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
:param message: Content to sign, as bytes
... | [
"async",
"def",
"sign",
"(",
"self",
",",
"message",
":",
"bytes",
",",
"verkey",
":",
"str",
"=",
"None",
")",
"->",
"bytes",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.sign >>> message: %s, verkey: %s'",
",",
"message",
",",
"verkey",
")",
"if",
"not",
... | Derive signing key and Sign message; return signature. Raise WalletState if wallet is closed.
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
:param message: Content to sign, as bytes
:param verkey: verification key corresponding to private signing key (default anch... | [
"Derive",
"signing",
"key",
"and",
"Sign",
"message",
";",
"return",
"signature",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
".",
"Raise",
"AbsentMessage",
"for",
"missing",
"message",
"or",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1136-L1159 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.verify | async def verify(self, message: bytes, signature: bytes, verkey: str = None) -> bool:
"""
Verify signature against input signer verification key (default anchor's own).
Raise AbsentMessage for missing message or signature, or WalletState if wallet is closed.
:param message: Content to s... | python | async def verify(self, message: bytes, signature: bytes, verkey: str = None) -> bool:
"""
Verify signature against input signer verification key (default anchor's own).
Raise AbsentMessage for missing message or signature, or WalletState if wallet is closed.
:param message: Content to s... | [
"async",
"def",
"verify",
"(",
"self",
",",
"message",
":",
"bytes",
",",
"signature",
":",
"bytes",
",",
"verkey",
":",
"str",
"=",
"None",
")",
"->",
"bool",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.verify >>> message: %s, signature: %s, verkey: %s'",
",",... | Verify signature against input signer verification key (default anchor's own).
Raise AbsentMessage for missing message or signature, or WalletState if wallet is closed.
:param message: Content to sign, as bytes
:param signature: signature, as bytes
:param verkey: signer verification key... | [
"Verify",
"signature",
"against",
"input",
"signer",
"verification",
"key",
"(",
"default",
"anchor",
"s",
"own",
")",
".",
"Raise",
"AbsentMessage",
"for",
"missing",
"message",
"or",
"signature",
"or",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1161-L1189 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.pack | async def pack(
self,
message: str,
recip_verkeys: Union[str, Sequence[str]] = None,
sender_verkey: str = None) -> bytes:
"""
Pack a message for one or more recipients (default anchor only).
Raise AbsentMessage for missing message, or WalletState i... | python | async def pack(
self,
message: str,
recip_verkeys: Union[str, Sequence[str]] = None,
sender_verkey: str = None) -> bytes:
"""
Pack a message for one or more recipients (default anchor only).
Raise AbsentMessage for missing message, or WalletState i... | [
"async",
"def",
"pack",
"(",
"self",
",",
"message",
":",
"str",
",",
"recip_verkeys",
":",
"Union",
"[",
"str",
",",
"Sequence",
"[",
"str",
"]",
"]",
"=",
"None",
",",
"sender_verkey",
":",
"str",
"=",
"None",
")",
"->",
"bytes",
":",
"LOGGER",
"... | Pack a message for one or more recipients (default anchor only).
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
:param message: message to pack
:param recip_verkeys: verification keys of recipients (default anchor's own, only)
:param sender_verkey: sender v... | [
"Pack",
"a",
"message",
"for",
"one",
"or",
"more",
"recipients",
"(",
"default",
"anchor",
"only",
")",
".",
"Raise",
"AbsentMessage",
"for",
"missing",
"message",
"or",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1191-L1223 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.unpack | async def unpack(self, ciphertext: bytes) -> (str, str, str):
"""
Unpack a message. Return triple with cleartext, sender verification key, and recipient verification key.
Raise AbsentMessage for missing ciphertext, or WalletState if wallet is closed. Raise AbsentRecord
if wallet has no k... | python | async def unpack(self, ciphertext: bytes) -> (str, str, str):
"""
Unpack a message. Return triple with cleartext, sender verification key, and recipient verification key.
Raise AbsentMessage for missing ciphertext, or WalletState if wallet is closed. Raise AbsentRecord
if wallet has no k... | [
"async",
"def",
"unpack",
"(",
"self",
",",
"ciphertext",
":",
"bytes",
")",
"->",
"(",
"str",
",",
"str",
",",
"str",
")",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.unpack >>> ciphertext: %s'",
",",
"ciphertext",
")",
"if",
"not",
"ciphertext",
":",
"L... | Unpack a message. Return triple with cleartext, sender verification key, and recipient verification key.
Raise AbsentMessage for missing ciphertext, or WalletState if wallet is closed. Raise AbsentRecord
if wallet has no key to unpack ciphertext.
:param ciphertext: JWE-like formatted message as... | [
"Unpack",
"a",
"message",
".",
"Return",
"triple",
"with",
"cleartext",
"sender",
"verification",
"key",
"and",
"recipient",
"verification",
"key",
".",
"Raise",
"AbsentMessage",
"for",
"missing",
"ciphertext",
"or",
"WalletState",
"if",
"wallet",
"is",
"closed",
... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1225-L1252 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.reseed_init | async def reseed_init(self, next_seed: str = None) -> str:
"""
Begin reseed operation: generate new key. Raise WalletState if wallet is closed.
:param next_seed: incoming replacement seed (default random)
:return: new verification key
"""
LOGGER.debug('Wallet.reseed_ini... | python | async def reseed_init(self, next_seed: str = None) -> str:
"""
Begin reseed operation: generate new key. Raise WalletState if wallet is closed.
:param next_seed: incoming replacement seed (default random)
:return: new verification key
"""
LOGGER.debug('Wallet.reseed_ini... | [
"async",
"def",
"reseed_init",
"(",
"self",
",",
"next_seed",
":",
"str",
"=",
"None",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.reseed_init >>> next_seed: [SEED]'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"... | Begin reseed operation: generate new key. Raise WalletState if wallet is closed.
:param next_seed: incoming replacement seed (default random)
:return: new verification key | [
"Begin",
"reseed",
"operation",
":",
"generate",
"new",
"key",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1254-L1270 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/wallet/wallet.py | Wallet.reseed_apply | async def reseed_apply(self) -> DIDInfo:
"""
Replace verification key with new verification key from reseed operation.
Raise WalletState if wallet is closed.
:return: DIDInfo with new verification key and metadata for DID
"""
LOGGER.debug('Wallet.reseed_apply >>>')
... | python | async def reseed_apply(self) -> DIDInfo:
"""
Replace verification key with new verification key from reseed operation.
Raise WalletState if wallet is closed.
:return: DIDInfo with new verification key and metadata for DID
"""
LOGGER.debug('Wallet.reseed_apply >>>')
... | [
"async",
"def",
"reseed_apply",
"(",
"self",
")",
"->",
"DIDInfo",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.reseed_apply >>>'",
")",
"if",
"not",
"self",
".",
"handle",
":",
"LOGGER",
".",
"debug",
"(",
"'Wallet.reseed_init <!< Wallet %s is closed'",
",",
"sel... | Replace verification key with new verification key from reseed operation.
Raise WalletState if wallet is closed.
:return: DIDInfo with new verification key and metadata for DID | [
"Replace",
"verification",
"key",
"with",
"new",
"verification",
"key",
"from",
"reseed",
"operation",
".",
"Raise",
"WalletState",
"if",
"wallet",
"is",
"closed",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/wallet/wallet.py#L1272-L1295 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/origin.py | Origin.send_schema | async def send_schema(self, schema_data_json: str) -> str:
"""
Send schema to ledger, then retrieve it as written to the ledger and return it.
Raise BadLedgerTxn on failure. Raise BadAttribute for attribute name with spaces or
reserved for indy-sdk.
If schema already exists on l... | python | async def send_schema(self, schema_data_json: str) -> str:
"""
Send schema to ledger, then retrieve it as written to the ledger and return it.
Raise BadLedgerTxn on failure. Raise BadAttribute for attribute name with spaces or
reserved for indy-sdk.
If schema already exists on l... | [
"async",
"def",
"send_schema",
"(",
"self",
",",
"schema_data_json",
":",
"str",
")",
"->",
"str",
":",
"LOGGER",
".",
"debug",
"(",
"'Origin.send_schema >>> schema_data_json: %s'",
",",
"schema_data_json",
")",
"schema_data",
"=",
"json",
".",
"loads",
"(",
"sc... | Send schema to ledger, then retrieve it as written to the ledger and return it.
Raise BadLedgerTxn on failure. Raise BadAttribute for attribute name with spaces or
reserved for indy-sdk.
If schema already exists on ledger, log error and return schema.
:param schema_data_json: schema da... | [
"Send",
"schema",
"to",
"ledger",
"then",
"retrieve",
"it",
"as",
"written",
"to",
"the",
"ledger",
"and",
"return",
"it",
".",
"Raise",
"BadLedgerTxn",
"on",
"failure",
".",
"Raise",
"BadAttribute",
"for",
"attribute",
"name",
"with",
"spaces",
"or",
"reser... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/origin.py#L40-L102 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/demo.py | NominalAnchor.least_role | def least_role() -> Role:
"""
Return the indy-sdk null role for a tails sync anchor, which does not need write access.
:return: USER role
"""
LOGGER.debug('NominalAnchor.least_role >>>')
rv = Role.USER
LOGGER.debug('NominalAnchor.least_role <<< %s', rv)
... | python | def least_role() -> Role:
"""
Return the indy-sdk null role for a tails sync anchor, which does not need write access.
:return: USER role
"""
LOGGER.debug('NominalAnchor.least_role >>>')
rv = Role.USER
LOGGER.debug('NominalAnchor.least_role <<< %s', rv)
... | [
"def",
"least_role",
"(",
")",
"->",
"Role",
":",
"LOGGER",
".",
"debug",
"(",
"'NominalAnchor.least_role >>>'",
")",
"rv",
"=",
"Role",
".",
"USER",
"LOGGER",
".",
"debug",
"(",
"'NominalAnchor.least_role <<< %s'",
",",
"rv",
")",
"return",
"rv"
] | Return the indy-sdk null role for a tails sync anchor, which does not need write access.
:return: USER role | [
"Return",
"the",
"indy",
"-",
"sdk",
"null",
"role",
"for",
"a",
"tails",
"sync",
"anchor",
"which",
"does",
"not",
"need",
"write",
"access",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/demo.py#L46-L58 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/anchor/demo.py | OrgHubAnchor.close | async def close(self) -> None:
"""
Explicit exit. If so configured, populate cache to prove for any creds on schemata,
cred defs, and rev regs marked of interest in configuration at initialization,
archive cache, and purge prior cache archives.
:return: current object
""... | python | async def close(self) -> None:
"""
Explicit exit. If so configured, populate cache to prove for any creds on schemata,
cred defs, and rev regs marked of interest in configuration at initialization,
archive cache, and purge prior cache archives.
:return: current object
""... | [
"async",
"def",
"close",
"(",
"self",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'OrgHubAnchor.close >>>'",
")",
"archive_caches",
"=",
"False",
"if",
"self",
".",
"config",
".",
"get",
"(",
"'archive-holder-prover-caches-on-close'",
",",
"False",
"... | Explicit exit. If so configured, populate cache to prove for any creds on schemata,
cred defs, and rev regs marked of interest in configuration at initialization,
archive cache, and purge prior cache archives.
:return: current object | [
"Explicit",
"exit",
".",
"If",
"so",
"configured",
"populate",
"cache",
"to",
"prove",
"for",
"any",
"creds",
"on",
"schemata",
"cred",
"defs",
"and",
"rev",
"regs",
"marked",
"of",
"interest",
"in",
"configuration",
"at",
"initialization",
"archive",
"cache",... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/anchor/demo.py#L149-L182 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/canon.py | canon_cred_wql | def canon_cred_wql(query: dict) -> dict:
"""
Canonicalize WQL attribute marker and value keys for input to indy-sdk wallet credential filtration.
Canonicalize comparison values to proper indy-sdk raw values as per raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL que... | python | def canon_cred_wql(query: dict) -> dict:
"""
Canonicalize WQL attribute marker and value keys for input to indy-sdk wallet credential filtration.
Canonicalize comparison values to proper indy-sdk raw values as per raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL que... | [
"def",
"canon_cred_wql",
"(",
"query",
":",
"dict",
")",
"->",
"dict",
":",
"for",
"k",
"in",
"[",
"qk",
"for",
"qk",
"in",
"query",
"]",
":",
"# copy: iteration alters query keys",
"attr_match",
"=",
"re",
".",
"match",
"(",
"'attr::([^:]+)::(marker|value)$'"... | Canonicalize WQL attribute marker and value keys for input to indy-sdk wallet credential filtration.
Canonicalize comparison values to proper indy-sdk raw values as per raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL query
:return: canonicalized WQL query dict | [
"Canonicalize",
"WQL",
"attribute",
"marker",
"and",
"value",
"keys",
"for",
"input",
"to",
"indy",
"-",
"sdk",
"wallet",
"credential",
"filtration",
".",
"Canonicalize",
"comparison",
"values",
"to",
"proper",
"indy",
"-",
"sdk",
"raw",
"values",
"as",
"per",... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/canon.py#L54-L86 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/canon.py | canon_pairwise_wql | def canon_pairwise_wql(query: dict = None) -> dict:
"""
Canonicalize WQL tags to unencrypted storage specification.
Canonicalize comparison values to strings via raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL query
:return: canonicalized WQL query dict
"""... | python | def canon_pairwise_wql(query: dict = None) -> dict:
"""
Canonicalize WQL tags to unencrypted storage specification.
Canonicalize comparison values to strings via raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL query
:return: canonicalized WQL query dict
"""... | [
"def",
"canon_pairwise_wql",
"(",
"query",
":",
"dict",
"=",
"None",
")",
"->",
"dict",
":",
"if",
"not",
"query",
":",
"return",
"{",
"'~their_did'",
":",
"{",
"'$neq'",
":",
"''",
"}",
"}",
"for",
"k",
"in",
"[",
"qk",
"for",
"qk",
"in",
"query",... | Canonicalize WQL tags to unencrypted storage specification.
Canonicalize comparison values to strings via raw().
Raise BadWalletQuery for WQL mapping '$or' to non-list.
:param query: WQL query
:return: canonicalized WQL query dict | [
"Canonicalize",
"WQL",
"tags",
"to",
"unencrypted",
"storage",
"specification",
".",
"Canonicalize",
"comparison",
"values",
"to",
"strings",
"via",
"raw",
"()",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/canon.py#L136-L176 |
PSPC-SPAC-buyandsell/von_anchor | setup.py | parse_requirements | def parse_requirements(filename):
"""
Load requirements from a pip requirements file.
:param filename: file name with requirements to parse
"""
try:
with open(filename) as fh_req:
return [line.strip() for line in fh_req if line.strip() and not line.startswith('#')]
except F... | python | def parse_requirements(filename):
"""
Load requirements from a pip requirements file.
:param filename: file name with requirements to parse
"""
try:
with open(filename) as fh_req:
return [line.strip() for line in fh_req if line.strip() and not line.startswith('#')]
except F... | [
"def",
"parse_requirements",
"(",
"filename",
")",
":",
"try",
":",
"with",
"open",
"(",
"filename",
")",
"as",
"fh_req",
":",
"return",
"[",
"line",
".",
"strip",
"(",
")",
"for",
"line",
"in",
"fh_req",
"if",
"line",
".",
"strip",
"(",
")",
"and",
... | Load requirements from a pip requirements file.
:param filename: file name with requirements to parse | [
"Load",
"requirements",
"from",
"a",
"pip",
"requirements",
"file",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/setup.py#L29-L41 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/manager.py | NodePoolManager.add_config | async def add_config(self, name: str, genesis: str = None) -> None:
"""
Given pool name and genesis transaction path or data, add node pool configuration to indy home directory.
Raise ExtantPool if node pool configuration on input name already exists.
:param name: pool name
:par... | python | async def add_config(self, name: str, genesis: str = None) -> None:
"""
Given pool name and genesis transaction path or data, add node pool configuration to indy home directory.
Raise ExtantPool if node pool configuration on input name already exists.
:param name: pool name
:par... | [
"async",
"def",
"add_config",
"(",
"self",
",",
"name",
":",
"str",
",",
"genesis",
":",
"str",
"=",
"None",
")",
"->",
"None",
":",
"LOGGER",
".",
"debug",
"(",
"'NodePoolManager.__init__ >>> name: %s, genesis: %s'",
",",
"name",
",",
"genesis",
")",
"if",
... | Given pool name and genesis transaction path or data, add node pool configuration to indy home directory.
Raise ExtantPool if node pool configuration on input name already exists.
:param name: pool name
:param genesis: genesis transaction path or raw data | [
"Given",
"pool",
"name",
"and",
"genesis",
"transaction",
"path",
"or",
"data",
"add",
"node",
"pool",
"configuration",
"to",
"indy",
"home",
"directory",
".",
"Raise",
"ExtantPool",
"if",
"node",
"pool",
"configuration",
"on",
"input",
"name",
"already",
"exi... | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/manager.py#L73-L104 |
PSPC-SPAC-buyandsell/von_anchor | von_anchor/nodepool/manager.py | NodePoolManager.list | async def list(self) -> List[str]:
"""
Return list of pool names configured, empty list for none.
:return: list of pool names.
"""
LOGGER.debug('NodePoolManager.list >>>')
rv = [p['pool'] for p in await pool.list_pools()]
LOGGER.debug('NodePoolManager.list <<<... | python | async def list(self) -> List[str]:
"""
Return list of pool names configured, empty list for none.
:return: list of pool names.
"""
LOGGER.debug('NodePoolManager.list >>>')
rv = [p['pool'] for p in await pool.list_pools()]
LOGGER.debug('NodePoolManager.list <<<... | [
"async",
"def",
"list",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"LOGGER",
".",
"debug",
"(",
"'NodePoolManager.list >>>'",
")",
"rv",
"=",
"[",
"p",
"[",
"'pool'",
"]",
"for",
"p",
"in",
"await",
"pool",
".",
"list_pools",
"(",
")",
"... | Return list of pool names configured, empty list for none.
:return: list of pool names. | [
"Return",
"list",
"of",
"pool",
"names",
"configured",
"empty",
"list",
"for",
"none",
"."
] | train | https://github.com/PSPC-SPAC-buyandsell/von_anchor/blob/78ac1de67be42a676274f4bf71fe12f66e72f309/von_anchor/nodepool/manager.py#L106-L118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.