Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trinsic/trinsic

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trinsic/trinsic - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

17

lib/src/proto/services/trust-registry/v1/trust-registry.d.ts

@@ -110,13 +110,12 @@ import _m0 from "protobufjs/minimal";

}
/**
* Request to fetch membership status in governance framework for a specific credential schema.
* Only one of `did_uri`, `x509_cert` may be specified.
*/
/** Request to fetch membership status in governance framework for a specific credential schema. */
export interface GetMembershipStatusRequest {
/** URI of governance framework */
governanceFrameworkUri?: string;
/**
* The ID of the ecosystem governance framework.
* This ID may be found in the 'trustRegistry' field in the
* verifiable credential model
*/
frameworkId?: string;
/** DID URI of member */
didUri?: string | undefined;
/** X.509 certificate of member */
x509Cert?: string | undefined;
didUri?: string;
/** URI of credential schema associated with membership */

@@ -123,0 +122,0 @@ schemaUri?: string;

@@ -740,21 +740,12 @@ "use strict";

function createBaseGetMembershipStatusRequest() {
return {
governanceFrameworkUri: "",
didUri: undefined,
x509Cert: undefined,
schemaUri: "",
};
return { frameworkId: "", didUri: "", schemaUri: "" };
}
exports.GetMembershipStatusRequest = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.governanceFrameworkUri !== undefined &&
message.governanceFrameworkUri !== "") {
writer.uint32(10).string(message.governanceFrameworkUri);
if (message.frameworkId !== undefined && message.frameworkId !== "") {
writer.uint32(10).string(message.frameworkId);
}
if (message.didUri !== undefined) {
if (message.didUri !== undefined && message.didUri !== "") {
writer.uint32(18).string(message.didUri);
}
if (message.x509Cert !== undefined) {
writer.uint32(26).string(message.x509Cert);
}
if (message.schemaUri !== undefined && message.schemaUri !== "") {

@@ -773,3 +764,3 @@ writer.uint32(34).string(message.schemaUri);

case 1:
message.governanceFrameworkUri = reader.string();
message.frameworkId = reader.string();
break;

@@ -779,5 +770,2 @@ case 2:

break;
case 3:
message.x509Cert = reader.string();
break;
case 4:

@@ -795,7 +783,4 @@ message.schemaUri = reader.string();

return {
governanceFrameworkUri: isSet(object.governanceFrameworkUri)
? String(object.governanceFrameworkUri)
: "",
didUri: isSet(object.didUri) ? String(object.didUri) : undefined,
x509Cert: isSet(object.x509Cert) ? String(object.x509Cert) : undefined,
frameworkId: isSet(object.frameworkId) ? String(object.frameworkId) : "",
didUri: isSet(object.didUri) ? String(object.didUri) : "",
schemaUri: isSet(object.schemaUri) ? String(object.schemaUri) : "",

@@ -806,6 +791,5 @@ };

const obj = {};
message.governanceFrameworkUri !== undefined &&
(obj.governanceFrameworkUri = message.governanceFrameworkUri);
message.frameworkId !== undefined &&
(obj.frameworkId = message.frameworkId);
message.didUri !== undefined && (obj.didUri = message.didUri);
message.x509Cert !== undefined && (obj.x509Cert = message.x509Cert);
message.schemaUri !== undefined && (obj.schemaUri = message.schemaUri);

@@ -815,8 +799,7 @@ return obj;

fromPartial(object) {
var _a, _b, _c, _d;
var _a, _b, _c;
const message = createBaseGetMembershipStatusRequest();
message.governanceFrameworkUri = (_a = object.governanceFrameworkUri) !== null && _a !== void 0 ? _a : "";
message.didUri = (_b = object.didUri) !== null && _b !== void 0 ? _b : undefined;
message.x509Cert = (_c = object.x509Cert) !== null && _c !== void 0 ? _c : undefined;
message.schemaUri = (_d = object.schemaUri) !== null && _d !== void 0 ? _d : "";
message.frameworkId = (_a = object.frameworkId) !== null && _a !== void 0 ? _a : "";
message.didUri = (_b = object.didUri) !== null && _b !== void 0 ? _b : "";
message.schemaUri = (_c = object.schemaUri) !== null && _c !== void 0 ? _c : "";
return message;

@@ -823,0 +806,0 @@ },

@@ -67,2 +67,4 @@ import _m0 from "protobufjs/minimal";

documentJson?: string | undefined;
/** Wrap the output in a verifiable presentation */
useVerifiablePresentation?: boolean;
/**

@@ -122,9 +124,3 @@ * Nonce value used to derive the proof. If not specified, a random nonce will be generated.

email?: string | undefined;
/**
* DID of recipient (presently unsupported)
* string did_uri = 2 [deprecated=true];
* DIDComm out-of-band invitation JSON (presently unsupported)
* string didcomm_invitation_json = 3 [deprecated=true];
* Wallet ID of the recipient within the ecosystem
*/
/** Wallet ID of the recipient within the ecosystem */
walletId?: string | undefined;

@@ -131,0 +127,0 @@ /** DID URI of the recipient */

@@ -229,2 +229,3 @@ "use strict";

documentJson: undefined,
useVerifiablePresentation: false,
nonce: new Uint8Array(),

@@ -247,2 +248,5 @@ };

}
if (message.useVerifiablePresentation === true) {
writer.uint32(32).bool(message.useVerifiablePresentation);
}
if (message.nonce !== undefined && message.nonce.length !== 0) {

@@ -272,2 +276,5 @@ writer.uint32(82).bytes(message.nonce);

break;
case 4:
message.useVerifiablePresentation = reader.bool();
break;
case 10:

@@ -295,2 +302,5 @@ message.nonce = reader.bytes();

: undefined,
useVerifiablePresentation: isSet(object.useVerifiablePresentation)
? Boolean(object.useVerifiablePresentation)
: false,
nonce: isSet(object.nonce)

@@ -312,2 +322,4 @@ ? bytesFromBase64(object.nonce)

(obj.documentJson = message.documentJson);
message.useVerifiablePresentation !== undefined &&
(obj.useVerifiablePresentation = message.useVerifiablePresentation);
message.nonce !== undefined &&

@@ -318,3 +330,3 @@ (obj.nonce = base64FromBytes(message.nonce !== undefined ? message.nonce : new Uint8Array()));

fromPartial(object) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
const message = createBaseCreateProofRequest();

@@ -328,3 +340,5 @@ message.revealDocumentJson = (_a = object.revealDocumentJson) !== null && _a !== void 0 ? _a : undefined;

message.documentJson = (_c = object.documentJson) !== null && _c !== void 0 ? _c : undefined;
message.nonce = (_d = object.nonce) !== null && _d !== void 0 ? _d : new Uint8Array();
message.useVerifiablePresentation =
(_d = object.useVerifiablePresentation) !== null && _d !== void 0 ? _d : false;
message.nonce = (_e = object.nonce) !== null && _e !== void 0 ? _e : new Uint8Array();
return message;

@@ -331,0 +345,0 @@ },

@@ -5,3 +5,3 @@ "use strict";

function getSdkVersion() {
const sdkVersion = "1.9.0";
const sdkVersion = "1.10.0";
return sdkVersion;

@@ -8,0 +8,0 @@ }

@@ -16,3 +16,3 @@ "use strict";

let response = await trinsic.trustRegistry().addFramework(node_1.AddFrameworkRequest.fromPartial({
governanceFrameworkUri: `urn:egf:${(0, uuid_1.v4)()}`,
governanceFrameworkUri: `https://example.com/${(0, uuid_1.v4)()}`,
name: `Test Governance Framework - ${(0, uuid_1.v4)()}`,

@@ -36,3 +36,3 @@ }));

const didUri = "did:example:test";
const frameworkUri = `urn:egf:${(0, uuid_1.v4)()}`;
const frameworkUri = `https://example.com/${(0, uuid_1.v4)()}`;
const schemaUri = "https://schema.org/Card";

@@ -57,3 +57,3 @@ let frameworkResponse = await trinsic.trustRegistry().addFramework(node_1.AddFrameworkRequest.fromPartial({

didUri: didUri,
governanceFrameworkUri: frameworkUri,
frameworkId: frameworkResponse.id,
schemaUri: schemaUri,

@@ -65,3 +65,3 @@ }));

didUri: didUri,
governanceFrameworkUri: frameworkUri,
frameworkId: frameworkResponse.id,
schemaUri: schemaUri,

@@ -68,0 +68,0 @@ }));

@@ -29,2 +29,3 @@ "use strict";

it("Demo: create wallet, set profile, search records, issue credential", async () => {
var _a, _b;
trinsic.options = clinic;

@@ -43,4 +44,11 @@ let issueResponse = await trinsic.credential().issue({

// console.log("Item id=", insertItemResponse.itemId);
// Delay half a second for race condition fixes?
const itemId = insertItemResponse.itemId;
// Delay a second for race condition fixes?
await new Promise((res) => setTimeout(res, 1000));
// getItem() {
let getItemResponse = await trinsic.wallet().getItem({
itemId: itemId
});
//}
expect((_b = (_a = getItemResponse.itemJson) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0).toBeGreaterThan(0);
// searchWalletBasic() {

@@ -78,2 +86,9 @@ let items = await trinsic.wallet().searchWallet();

expect(selectiveVerifyResponse.validationResults["SignatureVerification"].isValid).toBeTruthy();
// Switch to Allison, who holds the credential
trinsic.options = allison;
// deleteItem() {
await trinsic.wallet().deleteItem({
itemId: itemId
});
//}
});

@@ -117,3 +132,13 @@ it("Demo: template management and credential issuance from template", async () => {

});
it("Delete wallet functions", async () => {
let response = await trinsic.account().loginAnonymous((0, env_1.myEcosystemIdOrName)());
let accountInfo = await trinsic.account().getInfo();
let walletId = accountInfo.walletId;
// deleteWallet() {
await trinsic.wallet().deleteWallet({
walletId: walletId
});
// }
});
});
//# sourceMappingURL=WalletService.test.js.map
{
"name": "@trinsic/trinsic",
"version": "1.9.0",
"version": "1.10.0",
"description": "Node and Browser wrapper for the Trinsic services",

@@ -5,0 +5,0 @@ "browser": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc