@kynesyslabs/demosdk 2.4.21 → 2.4.23

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.
@@ -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, IdentityPayload, InferFromSignatureTargetIdentityPayload, PqcIdentityAssignPayload, PqcIdentityRemovePayload, UserPoints, FindDemosIdByWeb2IdentityQuery, FindDemosIdByWeb3IdentityQuery, TelegramAttestationPayload, TelegramSignedAttestation } from "../types/abstraction";
11
- export { EvmCoinFinder, CoinFinder, Identities, InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, IdentityPayload, InferFromSignatureTargetIdentityPayload, PqcIdentityAssignPayload, PqcIdentityRemovePayload, UserPoints, FindDemosIdByWeb2IdentityQuery, FindDemosIdByWeb3IdentityQuery, TelegramAttestationPayload, TelegramSignedAttestation };
10
+ import { InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, IdentityPayload, InferFromSignatureTargetIdentityPayload, PqcIdentityAssignPayload, PqcIdentityRemovePayload, UDIdentityAssignPayload, UDIdentityRemovePayload, UserPoints, FindDemosIdByWeb2IdentityQuery, FindDemosIdByWeb3IdentityQuery, TelegramAttestationPayload, TelegramSignedAttestation } from "../types/abstraction";
11
+ export { EvmCoinFinder, CoinFinder, Identities, InferFromWritePayload, InferFromSignaturePayload, XMCoreTargetIdentityPayload, Web2CoreTargetIdentityPayload, InferFromGithubPayload, GithubProof, InferFromTwitterPayload, TwitterProof, IdentityPayload, InferFromSignatureTargetIdentityPayload, PqcIdentityAssignPayload, PqcIdentityRemovePayload, UDIdentityAssignPayload, UDIdentityRemovePayload, UserPoints, FindDemosIdByWeb2IdentityQuery, FindDemosIdByWeb3IdentityQuery, TelegramAttestationPayload, TelegramSignedAttestation };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/abstraction/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mDAA+C;AAwB3C,8FAxBK,6BAAa,OAwBL;AAvBjB,6CAAyC;AAwBrC,2FAxBK,uBAAU,OAwBL;AAvBd,6CAAyC;AAwBrC,2FAxBK,uBAAU,OAwBL"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/abstraction/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mDAA+C;AA0B3C,8FA1BK,6BAAa,OA0BL;AAzBjB,6CAAyC;AA0BrC,2FA1BK,uBAAU,OA0BL;AAzBd,6CAAyC;AA0BrC,2FA1BK,uBAAU,OA0BL"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Unstoppable Domains Multi-Chain Resolution Types
3
+ *
4
+ * These types represent the structures returned by UD resolution
5
+ * on both EVM and Solana chains, supporting multi-address verification.
6
+ */
7
+ /**
8
+ * Signature types supported for UD identity verification
9
+ */
10
+ export type SignatureType = "evm" | "solana";
11
+ /**
12
+ * Blockchain networks where UD domains can be registered
13
+ */
14
+ export type UDNetwork = "polygon" | "ethereum" | "base" | "sonic" | "solana";
15
+ /**
16
+ * Registry types for UD domains
17
+ */
18
+ export type UDRegistryType = "UNS" | "CNS";
19
+ /**
20
+ * Standard UD record keys for crypto addresses
21
+ */
22
+ export type UDRecordKey = "crypto.ETH.address" | "crypto.SOL.address" | "crypto.BTC.address" | "crypto.MATIC.address" | `token.EVM.${string}.${string}.address` | `token.SOL.${string}.${string}.address` | `ipfs.${string}.value` | `dns.${string}`;
23
+ /**
24
+ * Result of resolving a single record on Solana
25
+ */
26
+ export interface SolanaRecordResult {
27
+ /** The record key that was queried */
28
+ key: string;
29
+ /** The resolved value, or null if not found */
30
+ value: string | null;
31
+ /** Whether the record was successfully found */
32
+ found: boolean;
33
+ /** Error message if resolution failed */
34
+ error?: string;
35
+ }
36
+ /**
37
+ * Complete Solana domain resolution result
38
+ */
39
+ export interface SolanaDomainResolution {
40
+ /** The full domain name (label.tld) */
41
+ domain: string;
42
+ /** Whether the domain exists on-chain */
43
+ exists: boolean;
44
+ /** The derived SLD PDA address */
45
+ sldPda: string;
46
+ /** Domain properties PDA address */
47
+ domainPropertiesPda?: string;
48
+ /** Records version from domain properties */
49
+ recordsVersion?: number;
50
+ /** Array of record resolution results */
51
+ records: SolanaRecordResult[];
52
+ /** Any error that occurred during resolution */
53
+ error?: string;
54
+ }
55
+ /**
56
+ * EVM domain resolution result with records
57
+ */
58
+ export interface EVMDomainResolution {
59
+ /** The full domain name */
60
+ domain: string;
61
+ /** Network where domain was found */
62
+ network: "polygon" | "ethereum" | "base" | "sonic";
63
+ /** Token ID (namehash of domain) */
64
+ tokenId: string;
65
+ /** Domain owner address */
66
+ owner: string;
67
+ /** Resolver contract address */
68
+ resolver: string;
69
+ /** Record key-value pairs (null if not found) */
70
+ records: Record<string, string | null>;
71
+ }
72
+ /**
73
+ * A signable address extracted from domain records
74
+ */
75
+ export interface SignableAddress {
76
+ /** The blockchain address */
77
+ address: string;
78
+ /** Record key this address came from */
79
+ recordKey: string;
80
+ /** Signature type (evm or solana) */
81
+ signatureType: SignatureType;
82
+ }
83
+ /**
84
+ * Unified domain resolution result (EVM or Solana)
85
+ */
86
+ export interface UnifiedDomainResolution {
87
+ /** The full domain name */
88
+ domain: string;
89
+ /** Network where domain was found */
90
+ network: UDNetwork;
91
+ /** Registry type */
92
+ registryType: UDRegistryType;
93
+ /** Array of addresses that can sign challenges */
94
+ authorizedAddresses: SignableAddress[];
95
+ /** Additional metadata (chain-specific) */
96
+ metadata?: {
97
+ /** EVM-specific data */
98
+ evm?: {
99
+ tokenId: string;
100
+ owner: string;
101
+ resolver: string;
102
+ };
103
+ /** Solana-specific data */
104
+ solana?: {
105
+ sldPda: string;
106
+ domainPropertiesPda: string;
107
+ recordsVersion: number;
108
+ };
109
+ };
110
+ }
111
+ /**
112
+ * Payload for UD identity assignment request (UPDATED)
113
+ */
114
+ export interface UDIdentityAssignPayload {
115
+ type: "ud";
116
+ payload: {
117
+ /** The UD domain being linked */
118
+ domain: string;
119
+ /** The address that signed the challenge */
120
+ signingAddress: string;
121
+ /** Type of signature (auto-detected from address) */
122
+ signatureType: SignatureType;
123
+ /** Signature of the challenge */
124
+ signature: string;
125
+ /** Challenge message that was signed */
126
+ signedData: string;
127
+ /** Public key (for Solana verification) */
128
+ publicKey: string;
129
+ /** Network where domain is registered */
130
+ network: UDNetwork;
131
+ /** Registry type */
132
+ registryType: UDRegistryType;
133
+ /** Timestamp of signing */
134
+ timestamp: number;
135
+ };
136
+ }
137
+ /**
138
+ * UD identity payload (simplified)
139
+ */
140
+ export type UDIdentityPayload = UDIdentityAssignPayload["payload"];
141
+ /**
142
+ * Configuration for UD resolution
143
+ */
144
+ export interface UDResolutionConfig {
145
+ /** Solana RPC URL (optional) */
146
+ solanaRpcUrl?: string;
147
+ /** Ethereum RPC URL (optional) */
148
+ ethereumRpcUrl?: string;
149
+ /** Polygon RPC URL (optional) */
150
+ polygonRpcUrl?: string;
151
+ }
152
+ /**
153
+ * Result of address type detection
154
+ */
155
+ export interface AddressTypeInfo {
156
+ address: string;
157
+ type: SignatureType | null;
158
+ isSignable: boolean;
159
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * Unstoppable Domains Multi-Chain Resolution Types
4
+ *
5
+ * These types represent the structures returned by UD resolution
6
+ * on both EVM and Solana chains, supporting multi-address verification.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=UDResolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UDResolution.js","sourceRoot":"","sources":["../../../../src/abstraction/types/UDResolution.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -105,6 +105,8 @@ export interface GCREditSmartContract {
105
105
  export interface GCREditStorageProgram {
106
106
  type: "storageProgram";
107
107
  target: string;
108
+ isRollback: boolean;
109
+ txhash: string;
108
110
  context: {
109
111
  operation: string;
110
112
  sender: string;
@@ -35,3 +35,4 @@ export { ChainProviders, SupportedChains, SupportedTokens, } from "./bridge/cons
35
35
  export { type SigningAlgorithm, type EncryptionAlgorithm } from "./cryptography";
36
36
  export { Ed25519SignedObject, PqcSignedObject, encryptedObject, SerializedEncryptedObject, SerializedSignedObject, signedObject, } from "../encryption/unifiedCrypto";
37
37
  export { isTransactionType, isTransactionDataType, } from "./blockchain/TransactionSubtypes/utils";
38
+ export { type SignatureType, type UDNetwork, type UDRegistryType, type UDRecordKey, type SolanaRecordResult, type SolanaDomainResolution, type EVMDomainResolution, type SignableAddress, type UnifiedDomainResolution, type UDIdentityAssignPayload, type UDIdentityPayload, type UDResolutionConfig, type AddressTypeInfo, } from "../abstraction/types/UDResolution";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynesyslabs/demosdk",
3
- "version": "2.4.21",
3
+ "version": "2.4.23",
4
4
  "description": "Demosdk is a JavaScript/TypeScript SDK that provides a unified interface for interacting with Demos network",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",