@kynesyslabs/demosdk 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abstraction/Identities.d.ts +3 -2
- package/build/abstraction/Identities.js +38 -14
- package/build/abstraction/Identities.js.map +1 -1
- package/build/abstraction/index.d.ts +2 -2
- package/build/abstraction/index.js.map +1 -1
- package/build/types/abstraction/index.d.ts +5 -2
- package/build/types/abstraction/index.js.map +1 -1
- package/build/types/blockchain/GCREdit.d.ts +25 -1
- package/build/types/blockchain/Transaction.d.ts +3 -2
- package/build/websdk/GCRGeneration.d.ts +4 -1
- package/build/websdk/GCRGeneration.js +50 -2
- package/build/websdk/GCRGeneration.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RPCResponseWithValidityData } from "../types";
|
|
1
2
|
import { XMCoreTargetIdentityPayload, GithubProof, TwitterProof, InferFromSignaturePayload, InferFromWritePayload } from "../types/abstraction";
|
|
2
3
|
import { Demos } from "../websdk/demosclass";
|
|
3
4
|
export default class Identities {
|
|
@@ -8,7 +9,7 @@ export default class Identities {
|
|
|
8
9
|
* @param payload The payload to infer the identity from.
|
|
9
10
|
* @returns The identity inferred from the payload.
|
|
10
11
|
*/
|
|
11
|
-
inferIdentity(demos: Demos, payload: InferFromWritePayload | InferFromSignaturePayload): Promise<
|
|
12
|
+
inferIdentity(demos: Demos, payload: InferFromWritePayload | InferFromSignaturePayload): Promise<RPCResponseWithValidityData>;
|
|
12
13
|
/**
|
|
13
14
|
* Remove a crosschain identity associated with an address.
|
|
14
15
|
*
|
|
@@ -16,7 +17,7 @@ export default class Identities {
|
|
|
16
17
|
* @param payload The payload to remove the identity from.
|
|
17
18
|
* @returns The response from the RPC call.
|
|
18
19
|
*/
|
|
19
|
-
removeXmIdentity(demos: Demos, payload: XMCoreTargetIdentityPayload): Promise<
|
|
20
|
+
removeXmIdentity(demos: Demos, payload: XMCoreTargetIdentityPayload): Promise<RPCResponseWithValidityData>;
|
|
20
21
|
/**
|
|
21
22
|
* Add a github identity to the GCR.
|
|
22
23
|
*
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// TODO Implement the identities abstraction
|
|
3
3
|
// This should be able to query and set the GCR identities for a Demos address
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const websdk_1 = require("../websdk");
|
|
5
6
|
class Identities {
|
|
6
7
|
// Infer identity from either a write transaction or a signature
|
|
7
8
|
/**
|
|
@@ -12,16 +13,28 @@ class Identities {
|
|
|
12
13
|
* @returns The identity inferred from the payload.
|
|
13
14
|
*/
|
|
14
15
|
async inferIdentity(demos, payload) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const tx = websdk_1.DemosTransactions.empty();
|
|
17
|
+
const address = payload.target_identity.targetAddress;
|
|
18
|
+
const nonce = await demos.getAddressNonce(address);
|
|
19
|
+
tx.content = {
|
|
20
|
+
...tx.content,
|
|
21
|
+
type: "identity",
|
|
22
|
+
from: address,
|
|
23
|
+
to: address,
|
|
24
|
+
amount: 0,
|
|
25
|
+
data: [
|
|
26
|
+
"identity",
|
|
18
27
|
{
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
context: "xm",
|
|
29
|
+
method: "identity_assign",
|
|
30
|
+
payload: payload,
|
|
21
31
|
},
|
|
22
32
|
],
|
|
33
|
+
nonce: nonce + 1,
|
|
34
|
+
timestamp: Date.now(),
|
|
23
35
|
};
|
|
24
|
-
|
|
36
|
+
const signedTx = await demos.sign(tx);
|
|
37
|
+
return await demos.confirm(signedTx);
|
|
25
38
|
}
|
|
26
39
|
/**
|
|
27
40
|
* Remove a crosschain identity associated with an address.
|
|
@@ -31,16 +44,27 @@ class Identities {
|
|
|
31
44
|
* @returns The response from the RPC call.
|
|
32
45
|
*/
|
|
33
46
|
async removeXmIdentity(demos, payload) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
const tx = websdk_1.DemosTransactions.empty();
|
|
48
|
+
const address = demos.getAddress();
|
|
49
|
+
tx.content = {
|
|
50
|
+
...tx.content,
|
|
51
|
+
type: "identity",
|
|
52
|
+
from: address,
|
|
53
|
+
to: address,
|
|
54
|
+
amount: 0,
|
|
55
|
+
data: [
|
|
56
|
+
"identity",
|
|
37
57
|
{
|
|
38
|
-
|
|
39
|
-
|
|
58
|
+
context: "xm",
|
|
59
|
+
method: "identity_remove",
|
|
60
|
+
payload: payload,
|
|
40
61
|
},
|
|
41
62
|
],
|
|
63
|
+
nonce: 1,
|
|
64
|
+
timestamp: Date.now(),
|
|
42
65
|
};
|
|
43
|
-
|
|
66
|
+
const signedTx = await demos.sign(tx);
|
|
67
|
+
return await demos.confirm(signedTx);
|
|
44
68
|
}
|
|
45
69
|
/**
|
|
46
70
|
* Add a github identity to the GCR.
|
|
@@ -52,7 +76,7 @@ class Identities {
|
|
|
52
76
|
async addGithubIdentity(demos, payload) {
|
|
53
77
|
let githubPayload = {
|
|
54
78
|
context: "github",
|
|
55
|
-
proof: payload
|
|
79
|
+
proof: payload,
|
|
56
80
|
};
|
|
57
81
|
const request = {
|
|
58
82
|
method: "gcr_routine",
|
|
@@ -75,7 +99,7 @@ class Identities {
|
|
|
75
99
|
async addTwitterIdentity(demos, payload) {
|
|
76
100
|
let twitterPayload = {
|
|
77
101
|
context: "twitter",
|
|
78
|
-
proof: payload
|
|
102
|
+
proof: payload,
|
|
79
103
|
};
|
|
80
104
|
const request = {
|
|
81
105
|
method: "gcr_routine",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Identities.js","sourceRoot":"","sources":["../../../src/abstraction/Identities.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,8EAA8E;;AAgB9E,MAAqB,UAAU;IAC3B,gEAAgE;
|
|
1
|
+
{"version":3,"file":"Identities.js","sourceRoot":"","sources":["../../../src/abstraction/Identities.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC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oBACI,MAAM,EAAE,eAAe;oBACvB,MAAM,EAAE,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;iBAC1C;aACJ;SACJ,CAAA;QAED,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;CACJ;AApJD,6BAoJC"}
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
import { EvmCoinFinder } from "./EvmCoinFinder";
|
|
8
8
|
import { CoinFinder } from "./CoinFinder";
|
|
9
9
|
import Identities from "./Identities";
|
|
10
|
-
import { InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof } from "../types/abstraction";
|
|
11
|
-
export { EvmCoinFinder, CoinFinder, Identities, InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, };
|
|
10
|
+
import { InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, IdentityPayload, InferFromSignatureTargetIdentityPayload } from "../types/abstraction";
|
|
11
|
+
export { EvmCoinFinder, CoinFinder, Identities, InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, IdentityPayload, InferFromSignatureTargetIdentityPayload };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/abstraction/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,mDAA+C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/abstraction/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,mDAA+C;AAiB3C,8FAjBK,6BAAa,OAiBL;AAhBjB,6CAAyC;AAiBrC,2FAjBK,uBAAU,OAiBL;AAhBd,8DAAqC;AAiBjC,qBAjBG,oBAAU,CAiBH"}
|
|
@@ -8,7 +8,6 @@ export interface XMCoreTargetIdentityPayload {
|
|
|
8
8
|
*/
|
|
9
9
|
export interface InferFromSignatureTargetIdentityPayload extends XMCoreTargetIdentityPayload {
|
|
10
10
|
chainId: number | string;
|
|
11
|
-
isEVM: boolean;
|
|
12
11
|
signature: string;
|
|
13
12
|
signedData: string;
|
|
14
13
|
targetAddress: string;
|
|
@@ -19,7 +18,6 @@ export interface InferFromSignatureTargetIdentityPayload extends XMCoreTargetIde
|
|
|
19
18
|
*/
|
|
20
19
|
export interface InferFromWriteTargetIdentityPayload extends XMCoreTargetIdentityPayload {
|
|
21
20
|
txHash: string;
|
|
22
|
-
isEVM: boolean;
|
|
23
21
|
chainId: number | string;
|
|
24
22
|
rpcUrl?: string;
|
|
25
23
|
}
|
|
@@ -62,3 +60,8 @@ export interface InferFromXPayload extends Web2CoreTargetIdentityPayload {
|
|
|
62
60
|
}
|
|
63
61
|
export interface InferFromTwitterPayload extends InferFromXPayload {
|
|
64
62
|
}
|
|
63
|
+
export interface IdentityPayload {
|
|
64
|
+
context: "xm" | "web2";
|
|
65
|
+
method: "identity_assign" | "identity_remove";
|
|
66
|
+
payload: InferFromGithubPayload | InferFromSignaturePayload | InferFromWritePayload | XMCoreTargetIdentityPayload;
|
|
67
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/abstraction/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/abstraction/index.ts"],"names":[],"mappings":";AAAA,gCAAgC"}
|
|
@@ -34,4 +34,28 @@ export interface GCREditSubnetsTx {
|
|
|
34
34
|
account: string;
|
|
35
35
|
txhash: string;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export interface XmGCRData {
|
|
38
|
+
chain: string;
|
|
39
|
+
subchain: string;
|
|
40
|
+
identity: string;
|
|
41
|
+
}
|
|
42
|
+
export interface XmGCRIdentityData {
|
|
43
|
+
chain: string;
|
|
44
|
+
subchain: string;
|
|
45
|
+
signature: string;
|
|
46
|
+
signedData: string;
|
|
47
|
+
targetAddress: string;
|
|
48
|
+
isEVM: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface Web2GCRData {
|
|
51
|
+
}
|
|
52
|
+
export interface GCREditIdentity {
|
|
53
|
+
type: "identity";
|
|
54
|
+
isRollback: boolean;
|
|
55
|
+
account: string;
|
|
56
|
+
context: "xm" | "web2";
|
|
57
|
+
operation: "add" | "remove";
|
|
58
|
+
data: XmGCRData | Web2GCRData | XmGCRIdentityData;
|
|
59
|
+
txhash: string;
|
|
60
|
+
}
|
|
61
|
+
export type GCREdit = GCREditBalance | GCREditNonce | GCREditAssign | GCREditAssignIdentity | GCREditSubnetsTx | GCREditIdentity;
|
|
@@ -7,9 +7,10 @@ import { XMScript } from "../xm";
|
|
|
7
7
|
import { GCREdit } from "./GCREdit";
|
|
8
8
|
import { INativePayload } from "../native";
|
|
9
9
|
import { SubnetPayload } from "../../l2ps";
|
|
10
|
-
|
|
10
|
+
import { IdentityPayload } from "../abstraction";
|
|
11
|
+
export type TransactionContentData = ["web2Request", IWeb2Payload] | ["crosschainOperation", XMScript] | ["native", INativePayload] | ["demoswork", DemoScript] | ["subnet", SubnetPayload] | ["identity", IdentityPayload];
|
|
11
12
|
export interface TransactionContent {
|
|
12
|
-
type: "web2Request" | "crosschainOperation" | "subnet" | "native" | "demoswork" | "genesis" | "NODE_ONLINE";
|
|
13
|
+
type: "web2Request" | "crosschainOperation" | "subnet" | "native" | "demoswork" | "genesis" | "NODE_ONLINE" | "identity";
|
|
13
14
|
from: forge.pki.ed25519.BinaryBuffer | forge.pki.PublicKey | ISignature;
|
|
14
15
|
to: forge.pki.ed25519.BinaryBuffer | forge.pki.PrivateKey | ISignature;
|
|
15
16
|
amount: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GCREdit } from "../types/blockchain/GCREdit";
|
|
1
|
+
import { GCREdit, GCREditIdentity } from "../types/blockchain/GCREdit";
|
|
2
2
|
import { Transaction } from "../types/blockchain/Transaction";
|
|
3
3
|
/**
|
|
4
4
|
* This class is responsible for generating the GCREdit for a transaction and is used
|
|
@@ -34,3 +34,6 @@ export declare class GCRGeneration {
|
|
|
34
34
|
export declare class HandleNativeOperations {
|
|
35
35
|
static handle(tx: Transaction, isRollback?: boolean): Promise<GCREdit[]>;
|
|
36
36
|
}
|
|
37
|
+
export declare class HandleIdentityOperations {
|
|
38
|
+
static handle(tx: Transaction): Promise<GCREditIdentity[]>;
|
|
39
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HandleNativeOperations = exports.GCRGeneration = void 0;
|
|
3
|
+
exports.HandleIdentityOperations = exports.HandleNativeOperations = exports.GCRGeneration = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* This class is responsible for generating the GCREdit for a transaction and is used
|
|
6
6
|
* both in the client and the node.
|
|
@@ -26,10 +26,18 @@ class GCRGeneration {
|
|
|
26
26
|
case "genesis":
|
|
27
27
|
// TODO Implement this
|
|
28
28
|
break;
|
|
29
|
+
case "identity":
|
|
30
|
+
var identityEdits = await HandleIdentityOperations.handle(tx);
|
|
31
|
+
gcrEdits.push(...identityEdits);
|
|
32
|
+
break;
|
|
29
33
|
}
|
|
30
34
|
// SECTION Operations valid for all tx types
|
|
31
35
|
// Add gas operation edit with check for availability of gas amount in the sender's balance
|
|
32
|
-
try {
|
|
36
|
+
nonceEdits: try {
|
|
37
|
+
// INFO: Skip gas for identity operations
|
|
38
|
+
if (content.type === "identity") {
|
|
39
|
+
break nonceEdits;
|
|
40
|
+
}
|
|
33
41
|
let gasEdit = await this.createGasEdit(content.from, tx.hash);
|
|
34
42
|
gcrEdits.push(gasEdit);
|
|
35
43
|
}
|
|
@@ -140,4 +148,44 @@ class HandleNativeOperations {
|
|
|
140
148
|
}
|
|
141
149
|
}
|
|
142
150
|
exports.HandleNativeOperations = HandleNativeOperations;
|
|
151
|
+
class HandleIdentityOperations {
|
|
152
|
+
static async handle(tx) {
|
|
153
|
+
const edits = [];
|
|
154
|
+
const identityPayloadData = tx.content
|
|
155
|
+
.data;
|
|
156
|
+
const identityPayload = identityPayloadData[1];
|
|
157
|
+
switch (identityPayload.method) {
|
|
158
|
+
case "identity_assign":
|
|
159
|
+
const targetIdentityPayload = identityPayload.payload;
|
|
160
|
+
const subEdit = {
|
|
161
|
+
account: tx.content.from,
|
|
162
|
+
type: "identity",
|
|
163
|
+
operation: "add",
|
|
164
|
+
txhash: tx.hash,
|
|
165
|
+
isRollback: false,
|
|
166
|
+
context: identityPayload.context,
|
|
167
|
+
data: targetIdentityPayload.target_identity,
|
|
168
|
+
};
|
|
169
|
+
edits.push(subEdit);
|
|
170
|
+
break;
|
|
171
|
+
case "identity_remove":
|
|
172
|
+
const removeEdit = {
|
|
173
|
+
account: tx.content.from,
|
|
174
|
+
type: "identity",
|
|
175
|
+
operation: "remove",
|
|
176
|
+
txhash: tx.hash,
|
|
177
|
+
isRollback: false,
|
|
178
|
+
context: identityPayload.context,
|
|
179
|
+
data: identityPayload.payload,
|
|
180
|
+
};
|
|
181
|
+
edits.push(removeEdit);
|
|
182
|
+
break;
|
|
183
|
+
default:
|
|
184
|
+
console.log("Unknown native operation: ", identityPayload.method);
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
return edits;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.HandleIdentityOperations = HandleIdentityOperations;
|
|
143
191
|
//# sourceMappingURL=GCRGeneration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GCRGeneration.js","sourceRoot":"","sources":["../../../src/websdk/GCRGeneration.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"GCRGeneration.js","sourceRoot":"","sources":["../../../src/websdk/GCRGeneration.ts"],"names":[],"mappings":";;;AAKA;;;;GAIG;AACH,MAAa,aAAa;IACtB,MAAM,CAAC,KAAK,CAAC,QAAQ,CACjB,EAAe,EACf,aAAsB,KAAK;QAE3B,MAAM,QAAQ,GAAc,EAAE,CAAA;QAC9B,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;QAEtB,gCAAgC;QAChC,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,WAAW;gBACZ,sBAAsB;gBACtB,MAAK;YACT,KAAK,QAAQ;gBACT,IAAI,WAAW,GAAG,MAAM,sBAAsB,CAAC,MAAM,CACjD,EAAE,EACF,UAAU,CACb,CAAA;gBACD,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAA;gBAC7B,MAAK;YACT,KAAK,aAAa,CAAC;YACnB,KAAK,qBAAqB;gBACtB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;gBACtD,MAAK;YACT,KAAK,SAAS;gBACV,sBAAsB;gBACtB,MAAK;YACT,KAAK,UAAU;gBACX,IAAI,aAAa,GAAG,MAAM,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;gBAC7D,QAAQ,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAA;gBAC/B,MAAK;QACb,CAAC;QAED,4CAA4C;QAE5C,2FAA2F;QAC3F,UAAU,EAAE,IAAI,CAAC;YACb,yCAAyC;YACzC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBAC9B,MAAM,UAAU,CAAA;YACpB,CAAC;YAED,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAClC,OAAO,CAAC,IAAc,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