@hashgraph/hedera-wallet-connect 1.0.5 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. package/README.md +59 -0
  2. package/dist/browser-cjs-metafile.json +1 -1
  3. package/dist/browser-cjs.js +11 -1
  4. package/dist/browser-esm-metafile.json +1 -1
  5. package/dist/browser-esm.js +11 -1
  6. package/dist/node-cjs-metafile.json +1 -1
  7. package/dist/node-cjs.js +142 -130
  8. package/dist/node-esm-metafile.json +1 -1
  9. package/dist/node-esm.js +142 -130
  10. package/dist/types/src/index.d.ts +2 -0
  11. package/dist/types/src/index.d.ts.map +1 -0
  12. package/dist/types/src/lib/dapp/DAppSigner.d.ts +35 -0
  13. package/dist/types/src/lib/dapp/DAppSigner.d.ts.map +1 -0
  14. package/dist/types/src/lib/dapp/index.d.ts +177 -0
  15. package/dist/types/src/lib/dapp/index.d.ts.map +1 -0
  16. package/dist/types/src/lib/index.d.ts +4 -0
  17. package/dist/types/src/lib/index.d.ts.map +1 -0
  18. package/dist/types/src/lib/shared/chainIds.d.ts +12 -0
  19. package/dist/types/src/lib/shared/chainIds.d.ts.map +1 -0
  20. package/dist/types/src/lib/shared/errors.d.ts +49 -0
  21. package/dist/types/src/lib/shared/errors.d.ts.map +1 -0
  22. package/dist/types/src/lib/shared/events.d.ts +8 -0
  23. package/dist/types/src/lib/shared/events.d.ts.map +1 -0
  24. package/dist/types/src/lib/shared/index.d.ts +7 -0
  25. package/dist/types/src/lib/shared/index.d.ts.map +1 -0
  26. package/dist/types/src/lib/shared/methods.d.ts +13 -0
  27. package/dist/types/src/lib/shared/methods.d.ts.map +1 -0
  28. package/dist/types/src/lib/shared/payloads.d.ts +102 -0
  29. package/dist/types/src/lib/shared/payloads.d.ts.map +1 -0
  30. package/dist/types/src/lib/shared/utils.d.ts +281 -0
  31. package/dist/types/src/lib/shared/utils.d.ts.map +1 -0
  32. package/dist/types/src/lib/wallet/index.d.ts +40 -0
  33. package/dist/types/src/lib/wallet/index.d.ts.map +1 -0
  34. package/dist/types/src/lib/wallet/provider.d.ts +18 -0
  35. package/dist/types/src/lib/wallet/provider.d.ts.map +1 -0
  36. package/dist/types/src/lib/wallet/types.d.ts +32 -0
  37. package/dist/types/src/lib/wallet/types.d.ts.map +1 -0
  38. package/dist/types/test/_helpers.d.ts +39 -0
  39. package/dist/types/test/_helpers.d.ts.map +1 -0
  40. package/dist/types/test/dapp/DAppConnector.test.d.ts +2 -0
  41. package/dist/types/test/dapp/DAppConnector.test.d.ts.map +1 -0
  42. package/dist/types/test/dapp/DAppSigner.test.d.ts +2 -0
  43. package/dist/types/test/dapp/DAppSigner.test.d.ts.map +1 -0
  44. package/dist/types/test/utils.test.d.ts +2 -0
  45. package/dist/types/test/utils.test.d.ts.map +1 -0
  46. package/dist/types/test/wallet/methods/wallet-executeTransaction.test.d.ts +2 -0
  47. package/dist/types/test/wallet/methods/wallet-executeTransaction.test.d.ts.map +1 -0
  48. package/dist/types/test/wallet/methods/wallet-getNodeAddresses.test.d.ts +2 -0
  49. package/dist/types/test/wallet/methods/wallet-getNodeAddresses.test.d.ts.map +1 -0
  50. package/dist/types/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts +2 -0
  51. package/dist/types/test/wallet/methods/wallet-signAndExecuteQuery.test.d.ts.map +1 -0
  52. package/dist/types/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts +2 -0
  53. package/dist/types/test/wallet/methods/wallet-signAndExecuteTransaction.test.d.ts.map +1 -0
  54. package/dist/types/test/wallet/methods/wallet-signMessage.test.d.ts +2 -0
  55. package/dist/types/test/wallet/methods/wallet-signMessage.test.d.ts.map +1 -0
  56. package/dist/types/test/wallet/methods/wallet-signTransaction.test.d.ts +2 -0
  57. package/dist/types/test/wallet/methods/wallet-signTransaction.test.d.ts.map +1 -0
  58. package/dist/types/test/wallet/wallet-init.test.d.ts +2 -0
  59. package/dist/types/test/wallet/wallet-init.test.d.ts.map +1 -0
  60. package/package.json +5 -4
  61. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
  62. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
  63. package/.github/ISSUE_TEMPLATE/hip_820.md +0 -16
  64. package/.github/dependabot.yml +0 -17
  65. package/.github/workflows/prettier.yml +0 -28
  66. package/.github/workflows/publish.yml +0 -35
  67. package/.github/workflows/test.yml +0 -32
  68. package/.husky/pre-commit +0 -4
  69. package/.lintstagedrc.json +0 -5
  70. package/.prettierignore +0 -3
  71. package/jest.config.ts +0 -33
  72. package/scripts/examples/build.mjs +0 -54
  73. package/scripts/examples/dev.mjs +0 -54
  74. package/scripts/lib/build.mjs +0 -40
  75. package/scripts/lib/context.mjs +0 -71
  76. package/scripts/lib/watch.mjs +0 -28
  77. package/typedoc.json +0 -10
@@ -0,0 +1,281 @@
1
+ import { AccountId, PublicKey, Transaction, LedgerId, Query, SignerSignature } from '@hashgraph/sdk';
2
+ import { ProposalTypes, SessionTypes } from '@walletconnect/types';
3
+ import { proto } from '@hashgraph/proto';
4
+ /**
5
+ * Freezes a transaction if it is not already frozen. Transactions must
6
+ * be frozen before they can be converted to bytes.
7
+ *
8
+ * @param transaction - Any instance of a class that extends `Transaction`
9
+ */
10
+ export declare function freezeTransaction<T extends Transaction>(transaction: T): void;
11
+ /**
12
+ * Sets default consensus nodes that a transaction will be submitted to. Node Account ID(s)
13
+ * must be set before a transaction can be frozen. If they have already been set, this
14
+ * function will not modify the transaction.
15
+ * @param transaction - any instance of a class that extends `Transaction`
16
+ *
17
+ * @see {@link https://docs.hedera.com/hedera/networks/testnet/testnet-nodes | Full list of Testnet-nodes}
18
+ * @see {@link https://docs.hedera.com/hedera/networks/mainnet/mainnet-nodes | Full list of Mainnet-nodes}
19
+ */
20
+ export declare function setDefaultNodeAccountIds<T extends Transaction>(transaction: T): void;
21
+ /**
22
+ * Converts `Transaction` to a Base64-string.
23
+ *
24
+ * First converts a transaction to bytes and then encodes it as a Base64-string. Will attempt
25
+ * to set default Node Account ID and freeze the transaction before converting.
26
+ * @param transaction - Any instance of a class that extends `Transaction`
27
+ * @returns Base64 encoded representation of the input `Transaction` object
28
+ */
29
+ export declare function transactionToBase64String<T extends Transaction>(transaction: T): string;
30
+ /**
31
+ * Recreates a `Transaction` from a base64 encoded string.
32
+ *
33
+ * Decodes the string to a buffer,
34
+ * then passes to `Transaction.fromBytes`. For greater flexibility, this function uses the base
35
+ * `Transaction` class, but takes an optional type parameter if the type of transaction is known,
36
+ * allowing stronger typeing.
37
+ * @param transactionBytes - a base64 encoded string
38
+ * @returns `Transaction`
39
+ * @example
40
+ * ```ts
41
+ * const txn1 = base64StringToTransaction(bytesString)
42
+ * const txn2 = base64StringToTransaction<TransferTransaction>(bytesString)
43
+ * // txn1 type: Transaction
44
+ * // txn2 type: TransferTransaction
45
+ * ```
46
+ */
47
+ export declare function base64StringToTransaction<T extends Transaction>(transactionBytes: string): T;
48
+ /**
49
+ * @param transaction - a base64 encoded string of proto.TransactionBody.encode().finish()
50
+ * @returns `string`
51
+ * */
52
+ export declare function transactionToTransactionBody<T extends Transaction>(transaction: T, nodeAccountId: AccountId): any;
53
+ export declare function transactionBodyToBase64String(transactionBody: proto.TransactionBody): string;
54
+ /**
55
+ * @param transactionList - a proto.TransactionList object
56
+ * @returns `string`
57
+ * */
58
+ export declare function transactionListToBase64String(transactionList: proto.TransactionList): string;
59
+ /**
60
+ * Decodes base64 encoded proto.TransactionBody bytes to a `proto.TransactionBody` object.
61
+ *
62
+ * @param transactionBody - a base64 encoded string of proto.TransactionBody.encode().finish()
63
+ * @returns `Transaction`
64
+ *
65
+ * */
66
+ export declare function base64StringToTransactionBody(transactionBody: string): proto.TransactionBody;
67
+ /**
68
+ * Converts a `proto.SignatureMap` to a base64 encoded string.
69
+ *
70
+ * First converts the `proto.SignatureMap` object to a JSON.
71
+ * Then encodes the JSON to a base64 encoded string.
72
+ * @param signatureMap - The `proto.SignatureMap` object to be converted
73
+ * @returns Base64-encoded string representation of the input `proto.SignatureMap`
74
+ */
75
+ export declare function signatureMapToBase64String(signatureMap: proto.SignatureMap): string;
76
+ /**
77
+ * Converts a Base64-encoded string to a `proto.SignatureMap`.
78
+ * @param base64string - Base64-encoded string
79
+ * @returns `proto.SignatureMap`
80
+ */
81
+ export declare function base64StringToSignatureMap(base64string: string): proto.SignatureMap;
82
+ /**
83
+ * Encodes the binary data represented by the `Uint8Array` to a Base64 string.
84
+ * @param binary - The `Uint8Array` containing binary data to be converted
85
+ * @returns Base64-encoded string representation of the input `Uint8Array`
86
+ */
87
+ export declare function Uint8ArrayToBase64String(binary: Uint8Array): string;
88
+ /**
89
+ * Converts a Base64-encoded string to a `Uint8Array`.
90
+ * @param base64string - Base64-encoded string to be converted
91
+ * @returns A `Uint8Array` representing the decoded binary data
92
+ */
93
+ export declare function base64StringToUint8Array(base64string: string): Uint8Array;
94
+ /**
95
+ * Converts a `Query` object to a Base64-encoded string.
96
+ * First utilizes the `toBytes` method of the `Query` instance to obtain its binary `Uint8Array` representation.
97
+ * Then encodes the binary `Uint8Array` to a Base64 string representation.
98
+ * @param query - A `Query` object to be converted
99
+ * @returns Base64 encoded representation of the input `Query` object
100
+ */
101
+ export declare function queryToBase64String<T, Q extends Query<T>>(query: Q): string;
102
+ /**
103
+ * Recreates a `Query` from a Base64-encoded string. First decodes the string to a buffer,
104
+ * then passes to `Query.fromBytes`. For greater flexibility, this function uses the base
105
+ * `Query` class, but takes an optional type parameter if the type of query is known,
106
+ * allowing stronger typeing.
107
+ * @param bytesString - Base64-encoded string
108
+ * @returns `Query<T>`
109
+ * @example
110
+ * ```ts
111
+ * const query1 = base64StringToQuery(bytesString)
112
+ * const query2 = base64StringToQuery<AccountInfoQuery>(bytesString)
113
+ * // query1 type: Query<any>
114
+ * // query2 type: AccountInfoQuery
115
+ * ```
116
+ */
117
+ export declare function base64StringToQuery<Q extends Query<any>>(bytesString: string): Q;
118
+ export declare function prefixMessageToSign(message: string): string;
119
+ /**
120
+ * Incorporates additional data (salt) into the message to alter the output signature.
121
+ * This alteration ensures that passing a transaction here for signing will yield an invalid signature,
122
+ * as the additional data modifies the signature text.
123
+ *
124
+ * @param message - A plain text string
125
+ * @returns An array of Uint8Array containing the prepared message for signing
126
+ */
127
+ export declare function stringToSignerMessage(message: string): Uint8Array[];
128
+ /**
129
+ * This implementation expects a plain text string, which is prefixed and then signed by a wallet.
130
+ * Because the spec calls for 1 message to be signed and 1 signer, this function expects a single
131
+ * signature and used the first item in the sigPair array.
132
+ *
133
+ * @param message - A plain text string
134
+ * @param base64SignatureMap - A base64 encoded proto.SignatureMap object
135
+ * @param publicKey - A PublicKey object use to verify the signature
136
+ * @returns boolean - whether or not the first signature in the sigPair is valid for the message and public key
137
+ */
138
+ export declare function verifyMessageSignature(message: string, base64SignatureMap: string, publicKey: PublicKey): boolean;
139
+ /**
140
+ * This implementation expects a plain text string, which is prefixed and then signed by a wallet.
141
+ * Because the spec calls for 1 message to be signed and 1 signer, this function expects a single
142
+ * signature and used the first item in the sigPair array.
143
+ *
144
+ * @param message - A plain text string
145
+ * @param signerSignature - A SignerSignature object
146
+ * @param publicKey - A PublicKey object use to verify the signature
147
+ * @returns boolean - whether or not the first signature in the sigPair is valid for the message and public key
148
+ */
149
+ export declare function verifySignerSignature(message: string, signerSignature: SignerSignature, publicKey: PublicKey): boolean;
150
+ /**
151
+ *
152
+ * https://github.com/hashgraph/hedera-sdk-js/blob/c78512b1d43eedf1d8bf2926a5b7ed3368fc39d1/src/PublicKey.js#L258
153
+ * a signature pair is a protobuf object with a signature and a public key, it is the responsibility of a dApp to ensure the public key matches the account id
154
+ * @param signerSignatures - An array of `SignerSignature` objects
155
+ * @returns `proto.SignatureMap` object
156
+ */
157
+ export declare function signerSignaturesToSignatureMap(signerSignatures: SignerSignature[]): proto.SignatureMap;
158
+ /**
159
+ * A mapping of `LedgerId` to EIP chain id and CAIP-2 network name.
160
+ *
161
+ * Structure: [`LedgerId`, `number` (EIP155 chain id), `string` (CAIP-2 chain id)][]
162
+ *
163
+ * @see {@link https://namespaces.chainagnostic.org/hedera/README | Hedera Namespaces}
164
+ * @see {@link https://hips.hedera.com/hip/hip-30 | CAIP Identifiers for the Hedera Network (HIP-30)}
165
+ */
166
+ export declare const LEDGER_ID_MAPPINGS: [LedgerId, number, string][];
167
+ /**
168
+ * Converts an EIP chain id to a LedgerId object.
169
+ *
170
+ * If no mapping is found, returns `LedgerId.LOCAL_NODE`.
171
+ *
172
+ * @param chainId - The EIP chain ID (number) to be converted
173
+ * @returns A `LedgerId` corresponding to the provided chain ID
174
+ * @example
175
+ * ```ts
176
+ * const localnodeLedgerId = EIPChainIdToLedgerId(298)
177
+ * console.log(localnodeLedgerId) // LedgerId.LOCAL_NODE
178
+ * const mainnetLedgerId = EIPChainIdToLedgerId(295)
179
+ * console.log(mainnetLedgerId) // LedgerId.MAINNET
180
+ * ```
181
+ */
182
+ export declare function EIPChainIdToLedgerId(chainId: number): LedgerId;
183
+ /**
184
+ * Converts a LedgerId object to an EIP chain id.
185
+ *
186
+ * If no mapping is found, returns the EIP chain id for `LedgerId.LOCAL_NODE`.
187
+ *
188
+ * @param ledgerId - The `LedgerId` object to be converted
189
+ * @returns A `number` representing the EIP chain id for the provided `LedgerId`
190
+ * @example
191
+ * ```ts
192
+ * const previewnetChainId = ledgerIdToEIPChainId(LedgerId.PREVIEWNET)
193
+ * console.log(previewnetChainId) // 297
194
+ * const testnetChainId = ledgerIdToEIPChainId(LedgerId.TESTNET)
195
+ * console.log(testnetChainId) // 296
196
+ * ```
197
+ */
198
+ export declare function ledgerIdToEIPChainId(ledgerId: LedgerId): number;
199
+ /**
200
+ * Converts a network name to an EIP chain id.
201
+ * If no mapping is found, returns the EIP chain id for `LedgerId.LOCAL_NODE`.
202
+ *
203
+ * @param networkName - The network name (string) to be converted
204
+ * @returns A `number` representing the EIP chain id for the provided network name
205
+ * @example
206
+ * ```ts
207
+ * const mainnetChainId = networkNameToEIPChainId('mainnet')
208
+ * console.log(mainnetChainId) // 295
209
+ * const testnetChainId = networkNameToEIPChainId('testnet')
210
+ * console.log(mainnetChainId) // 296
211
+ * ```
212
+ */
213
+ export declare function networkNameToEIPChainId(networkName: string): number;
214
+ /**
215
+ * Converts a CAIP chain id to a LedgerId object.
216
+ *
217
+ * If no mapping is found, returns `LedgerId.LOCAL_NODE`.
218
+ *
219
+ * @param chainId - The CAIP chain ID (string) to be converted
220
+ * @returns A `LedgerId` corresponding to the provided CAIP chain ID
221
+ * @example
222
+ * ```ts
223
+ * const previewnetLedgerId = CAIPChainIdToLedgerId(HederaChainId.Previewnet)
224
+ * console.log(previewnetLedgerId) // LedgerId.PREVIEWNET
225
+ * const testnetLedgerId = CAIPChainIdToLedgerId(HederaChainId.Testnet)
226
+ * console.log(testnetLedgerId) // LedgerId.TESTNET
227
+ * ```
228
+ */
229
+ export declare function CAIPChainIdToLedgerId(chainId: string): LedgerId;
230
+ /**
231
+ * Converts a LedgerId object to a CAIP chain id.
232
+ *
233
+ * If no mapping is found, returns the CAIP chain id for `LedgerId.LOCAL_NODE`.
234
+ *
235
+ * @param ledgerId - The `LedgerId` object to be converted
236
+ * @returns A `string` representing the CAIP chain id for the provided `LedgerId`
237
+ * @example
238
+ * ```ts
239
+ * const mainnetChainId = ledgerIdToCAIPChainId(HederaChainId.Mainnet)
240
+ * console.log(mainnetChainId) // LedgerId.PREVIEWNET
241
+ * const testnetChainId = ledgerIdToCAIPChainId(HederaChainId.Testnet)
242
+ * console.log(testnetChainId) // LedgerId.TESTNET
243
+ * ```
244
+ */
245
+ export declare function ledgerIdToCAIPChainId(ledgerId: LedgerId): string;
246
+ /**
247
+ * Converts a network name to a CAIP chain id.
248
+ *
249
+ * If no mapping is found, returns the CAIP chain id for `LedgerId.LOCAL_NODE`.
250
+ *
251
+ * @param networkName - The network name (string) to be converted
252
+ * @returns A `string` representing the CAIP chain id for the provided network name
253
+ * @example
254
+ * ```ts
255
+ * const previewnetChainId = networkNameToCAIPChainId('previewnet')
256
+ * console.log(previewnetChainId) // HederaChainId.Previewnet
257
+ * const devnetChainId = networkNameToCAIPChainId('devnet')
258
+ * console.log(devnetChainId) // HederaChainId.Devnet
259
+ * ```
260
+ */
261
+ export declare function networkNameToCAIPChainId(networkName: string): string;
262
+ /**
263
+ * Create a `ProposalTypes.RequiredNamespaces` object for a given ledgerId.
264
+ *
265
+ * @param ledgerId - The `LedgerId` for which the namespaces are created
266
+ * @param methods - An array of strings representing methods
267
+ * @param events - An array of strings representing events
268
+ * @returns A `ProposalTypes.RequiredNamespaces` object
269
+ */
270
+ export declare const networkNamespaces: (ledgerId: LedgerId, methods: string[], events: string[]) => ProposalTypes.RequiredNamespaces;
271
+ /**
272
+ * Get the account and ledger from a `SessionTypes.Struct` object.
273
+ *
274
+ * @param session - The `SessionTypes.Struct` object containing namespaces
275
+ * @returns `ProposalTypes.RequiredNamespaces` - an array of objects containing network (LedgerId) and account (AccountId)
276
+ */
277
+ export declare const accountAndLedgerFromSession: (session: SessionTypes.Struct) => {
278
+ network: LedgerId;
279
+ account: AccountId;
280
+ }[];
281
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/utils.ts"],"names":[],"mappings":"AAqBA,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,EACL,eAAe,EAChB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,CAAC,GAAG,IAAI,CAE7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,CAAC,GAAG,IAAI,CAMpF;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,WAAW,EAAE,WAAW,EAAE,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C3B;IAAE,OAAO,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,EAW3C,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { Web3Wallet, Web3WalletTypes } from '@walletconnect/web3wallet';
2
+ import { SessionTypes } from '@walletconnect/types';
3
+ import { Wallet as HederaWallet, AccountId, Transaction, Query } from '@hashgraph/sdk';
4
+ import { HederaChainId, HederaSessionEvent, HederaJsonRpcMethod } from '../shared';
5
+ import Provider from './provider';
6
+ import type { HederaNativeWallet } from './types';
7
+ export type { HederaNativeWallet } from './types';
8
+ export { default as WalletProvider } from './provider';
9
+ export declare class HederaWeb3Wallet extends Web3Wallet implements HederaNativeWallet {
10
+ chains: HederaChainId[] | string[];
11
+ methods: string[];
12
+ sessionEvents: HederaSessionEvent[] | string[];
13
+ constructor(opts: Web3WalletTypes.Options, chains?: HederaChainId[] | string[], methods?: string[], sessionEvents?: HederaSessionEvent[] | string[]);
14
+ static create(projectId: string, metadata: Web3WalletTypes.Metadata, chains?: HederaChainId[], methods?: string[], sessionEvents?: HederaSessionEvent[] | string[]): Promise<HederaWeb3Wallet>;
15
+ getHederaWallet(chainId: HederaChainId, accountId: AccountId | string, privateKey: string, _provider?: Provider): HederaWallet;
16
+ buildAndApproveSession(accounts: string[], { id, params }: Web3WalletTypes.SessionProposal): Promise<SessionTypes.Struct>;
17
+ validateParam(name: string, value: any, expectedType: string): void;
18
+ parseSessionRequest(event: Web3WalletTypes.SessionRequest, shouldThrow?: boolean): {
19
+ method: HederaJsonRpcMethod;
20
+ chainId: HederaChainId;
21
+ id: number;
22
+ topic: string;
23
+ body?: Transaction | Query<any> | string | Uint8Array | undefined;
24
+ accountId?: AccountId;
25
+ };
26
+ executeSessionRequest(event: Web3WalletTypes.SessionRequest, hederaWallet: HederaWallet): Promise<void>;
27
+ rejectSessionRequest(event: Web3WalletTypes.SessionRequest, error: {
28
+ code: number;
29
+ message: string;
30
+ }): Promise<void>;
31
+ hedera_getNodeAddresses(id: number, topic: string, _: any, // ignore this param to be consistent call signature with other functions
32
+ signer: HederaWallet): Promise<void>;
33
+ hedera_executeTransaction(id: number, topic: string, body: Transaction, signer: HederaWallet): Promise<void>;
34
+ hedera_signMessage(id: number, topic: string, body: string, signer: HederaWallet): Promise<void>;
35
+ hedera_signAndExecuteQuery(id: number, topic: string, body: Query<any>, signer: HederaWallet): Promise<void>;
36
+ hedera_signAndExecuteTransaction(id: number, topic: string, body: Transaction, signer: HederaWallet): Promise<void>;
37
+ hedera_signTransaction(id: number, topic: string, body: Uint8Array, signer: HederaWallet): Promise<void>;
38
+ }
39
+ export default HederaWeb3Wallet;
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wallet/index.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAU,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE9F,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EAcpB,MAAM,WAAW,CAAA;AAElB,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAMtD,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,kBAAkB;IAMnE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE;IAClC,OAAO,EAAE,MAAM,EAAE;IACjB,aAAa,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAAE;gBAHrD,IAAI,EAAE,eAAe,CAAC,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EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACvC,OAAO,CAAC,IAAI,CAAC;IAaH,uBAAuB,CAClC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,GAAG,EAAE,yEAAyE;IACjF,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAqBH,yBAAyB,CACpC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAaH,kBAAkB,CAC7B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAwBH,0BAA0B,CACrC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IA6BH,gCAAgC,CAC3C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAgBH,sBAAsB,CACjC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;CAsBjB;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { Client, type AccountId, type Executable, type Provider as HederaWalletProvider, type TransactionId, type TransactionResponse, type TransactionReceipt } from '@hashgraph/sdk';
2
+ export default class Provider implements HederaWalletProvider {
3
+ private client;
4
+ constructor(client: Client);
5
+ static fromClient(client: Client): Provider;
6
+ getLedgerId(): import("@hashgraph/sdk").LedgerId | null;
7
+ getNetwork(): {
8
+ [key: string]: string | AccountId;
9
+ };
10
+ getMirrorNetwork(): string[];
11
+ getAccountBalance(accountId: AccountId | string): Promise<import("@hashgraph/sdk").AccountBalance>;
12
+ getAccountInfo(accountId: AccountId | string): Promise<import("@hashgraph/sdk").AccountInfo>;
13
+ getAccountRecords(accountId: string | AccountId): Promise<import("@hashgraph/sdk").TransactionRecord[]>;
14
+ getTransactionReceipt(transactionId: TransactionId | string): Promise<TransactionReceipt>;
15
+ waitForReceipt(response: TransactionResponse): Promise<TransactionReceipt>;
16
+ call<Request, Response, Output>(request: Executable<Request, Response, Output>): Promise<Output>;
17
+ }
18
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wallet/provider.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,MAAM,EAKN,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,QAAQ,IAAI,oBAAoB,EACrC,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,oBAAoB;IAC/C,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;IAIhC,WAAW;IAIX,UAAU;;;IAIV,gBAAgB;IAIhB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;IAI/C,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;IAI5C,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;IAI/C,qBAAqB,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM;IAI3D,cAAc,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAO1E,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAC5B,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC;CAGnB"}
@@ -0,0 +1,32 @@
1
+ import type { Web3WalletTypes } from '@walletconnect/web3wallet';
2
+ import type { SessionTypes } from '@walletconnect/types';
3
+ import type { Transaction, Query, AccountId, Wallet as HederaWallet } from '@hashgraph/sdk';
4
+ import type { HederaJsonRpcMethod, HederaChainId } from '../shared';
5
+ import type Provider from './provider';
6
+ export interface HederaNativeWallet {
7
+ buildAndApproveSession(accounts: string[], { id, params }: Web3WalletTypes.SessionProposal): Promise<SessionTypes.Struct>;
8
+ parseSessionRequest(event: Web3WalletTypes.SessionRequest, shouldThrow: boolean): {
9
+ method: HederaJsonRpcMethod;
10
+ chainId: HederaChainId;
11
+ id: number;
12
+ topic: string;
13
+ body?: Transaction | Query<any> | string | Uint8Array | undefined;
14
+ accountId?: AccountId;
15
+ };
16
+ executeSessionRequest(event: Web3WalletTypes.SessionRequest, hederaWallet: HederaWallet): Promise<void>;
17
+ rejectSessionRequest(event: Web3WalletTypes.SessionRequest, error: {
18
+ code: number;
19
+ message: string;
20
+ }): Promise<void>;
21
+ getHederaWallet(chainId: HederaChainId, accountId: AccountId | string, privateKey: string, _provider?: Provider): HederaWallet;
22
+ [HederaJsonRpcMethod.GetNodeAddresses](id: number, topic: string, _: any, // ignore this param to be consistent call signature with other functions
23
+ signer: HederaWallet): Promise<void>;
24
+ [HederaJsonRpcMethod.ExecuteTransaction](id: number, topic: string, body: Transaction, signer: HederaWallet): Promise<void>;
25
+ [HederaJsonRpcMethod.SignMessage](id: number, topic: string, body: string, signer: HederaWallet): Promise<void>;
26
+ [HederaJsonRpcMethod.SignAndExecuteQuery](id: number, topic: string, body: Query<any>, signer: HederaWallet): Promise<void>;
27
+ [HederaJsonRpcMethod.SignAndExecuteTransaction](id: number, topic: string, body: Transaction, signer: HederaWallet): Promise<void>;
28
+ [HederaJsonRpcMethod.SignTransaction](id: number, topic: string, body: Uint8Array, signer: HederaWallet): Promise<void>;
29
+ }
30
+ export interface HederaEvmCompatibleWallet {
31
+ }
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/wallet/types.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3F,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAEtC,MAAM,WAAW,kBAAkB;IAIjC,sBAAsB,CACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,eAAe,CAAC,eAAe,GAC9C,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;IAE/B,mBAAmB,CACjB,KAAK,EAAE,eAAe,CAAC,cAAc,EACrC,WAAW,EAAE,OAAO,GACnB;QACD,MAAM,EAAE,mBAAmB,CAAA;QAC3B,OAAO,EAAE,aAAa,CAAA;QACtB,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAA;QACjE,SAAS,CAAC,EAAE,SAAS,CAAA;KACtB,CAAA;IAED,qBAAqB,CACnB,KAAK,EAAE,eAAe,CAAC,cAAc,EACrC,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhB,oBAAoB,CAClB,KAAK,EAAE,eAAe,CA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EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB;AAGD,MAAM,WAAW,yBAAyB;CAAG"}
@@ -0,0 +1,39 @@
1
+ import { AccountId, Query, Transaction, TransactionId } from '@hashgraph/sdk';
2
+ export declare const projectId = "ce06497abf4102004138a10edd29c921";
3
+ export declare const walletMetadata: {
4
+ name: string;
5
+ url: string;
6
+ description: string;
7
+ icons: string[];
8
+ };
9
+ export declare const dAppMetadata: {
10
+ name: string;
11
+ url: string;
12
+ description: string;
13
+ icons: string[];
14
+ };
15
+ export declare const requestId = 1;
16
+ export declare const requestTopic = "test-topic";
17
+ export declare const defaultAccountNumber = 12345;
18
+ export declare const defaultNodeId = 3;
19
+ export declare const testUserAccountId: AccountId;
20
+ export declare const testNodeAccountId: AccountId;
21
+ /** Fixed to a specific timestamp */
22
+ export declare const testTransactionId: TransactionId;
23
+ type TransactionOptions = {
24
+ setNodeAccountIds?: boolean;
25
+ setTransactionId?: boolean;
26
+ freeze?: boolean;
27
+ operatorAccountId?: number;
28
+ };
29
+ export declare function prepareTestTransaction<T extends Transaction = Transaction>(transaction: T, options?: TransactionOptions): T;
30
+ type QueryOptions = {
31
+ setNodeAccountIds?: boolean;
32
+ };
33
+ export declare function prepareTestQuery<Q extends Query<OutputT>, OutputT>(query: Q, options?: QueryOptions): Q;
34
+ export declare const testPrivateKeyECDSA = "3030020100300706052b8104000a042204203ce31ffad30d6db47c315bbea08232aad2266d8800a12aa3d8a812486e782759";
35
+ export declare const testPrivateKeyED25519 = "302e020100300506032b657004220420133eefea772add1f995c96bccf42b08b76daf67665f0c4c5ae308fae9275c142";
36
+ export declare function useJsonFixture(filename: string): any;
37
+ export declare function writeJsonFixture(filename: string, data: any): void;
38
+ export {};
39
+ //# sourceMappingURL=_helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_helpers.d.ts","sourceRoot":"","sources":["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C,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,QAG3D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DAppConnector.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DAppConnector.test.d.ts","sourceRoot":"","sources":["../../../../test/dapp/DAppConnector.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DAppSigner.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DAppSigner.test.d.ts","sourceRoot":"","sources":["../../../../test/dapp/DAppSigner.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../test/utils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-executeTransaction.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-executeTransaction.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-executeTransaction.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-getNodeAddresses.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-getNodeAddresses.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-getNodeAddresses.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-signAndExecuteQuery.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-signAndExecuteQuery.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-signAndExecuteQuery.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-signAndExecuteTransaction.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-signAndExecuteTransaction.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-signAndExecuteTransaction.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-signMessage.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-signMessage.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-signMessage.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-signTransaction.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-signTransaction.test.d.ts","sourceRoot":"","sources":["../../../../../test/wallet/methods/wallet-signTransaction.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wallet-init.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-init.test.d.ts","sourceRoot":"","sources":["../../../../test/wallet/wallet-init.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraph/hedera-wallet-connect",
3
- "version": "1.0.5",
3
+ "version": "1.1.1",
4
4
  "description": "A library to facilitate integrating Hedera with WalletConnect",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "./dist/node-cjs.js": "./dist/browser-cjs.js",
13
13
  "./dist/node-esm.js": "./dist/browser-esm.js"
14
14
  },
15
- "types": "./dist/types/index.d.ts",
15
+ "types": "./dist/types/src/index.d.ts",
16
16
  "author": "Hgraph <support@hgraph.io>",
17
17
  "keywords": [
18
18
  "hedera",
@@ -21,13 +21,14 @@
21
21
  ],
22
22
  "license": "Apache-2.0",
23
23
  "devDependencies": {
24
+ "@hashgraph/hedera-wallet-connect": "^1.0.5",
24
25
  "@types/jest": "^29.5.3",
25
26
  "@types/node": "^20.11.10",
26
27
  "@walletconnect/modal": "^2.6.2",
27
28
  "@walletconnect/sign-client": "^2.11.0",
28
29
  "@walletconnect/types": "^2.11.0",
29
30
  "concurrently": "^8.2.2",
30
- "esbuild": "^0.20.0",
31
+ "esbuild": "^0.21.2",
31
32
  "esbuild-plugin-copy": "^2.1.1",
32
33
  "eslint-plugin-tsdoc": "^0.2.17",
33
34
  "husky": "^9.0.6",
@@ -45,7 +46,6 @@
45
46
  },
46
47
  "dependencies": {
47
48
  "@hashgraph/sdk": "^2.40.0",
48
- "@hashgraph/walletconnect": "file:./",
49
49
  "@walletconnect/qrcode-modal": "^1.8.0",
50
50
  "@walletconnect/types": "^2.11.0",
51
51
  "@walletconnect/utils": "^2.11.0",
@@ -60,6 +60,7 @@
60
60
  "dev": "rimraf dist && npm run build && concurrently --raw \"npm run watch\" \"node scripts/examples/dev.mjs\"",
61
61
  "test": "jest",
62
62
  "test:connect": "jest --testMatch '**/DAppConnector.test.ts' --verbose",
63
+ "test:signer": "jest --testMatch '**/DAppSigner.test.ts' --verbose",
63
64
  "prepublishOnly": "rm -Rf dist && npm run build",
64
65
  "prepare": "husky install",
65
66
  "prettier:check": "prettier --check ./src/",
@@ -1,35 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
- ---
8
-
9
- **Describe the bug** A clear and concise description of what the bug is.
10
-
11
- **To Reproduce** Steps to reproduce the behavior:
12
-
13
- 1. Go to '...'
14
- 2. Click on '....'
15
- 3. Scroll down to '....'
16
- 4. See error
17
-
18
- **Expected behavior** A clear and concise description of what you expected to happen.
19
-
20
- **Screenshots** If applicable, add screenshots to help explain your problem.
21
-
22
- **Desktop (please complete the following information):**
23
-
24
- - OS: [e.g. iOS]
25
- - Browser [e.g. chrome, safari]
26
- - Version [e.g. 22]
27
-
28
- **Smartphone (please complete the following information):**
29
-
30
- - Device: [e.g. iPhone6]
31
- - OS: [e.g. iOS8.1]
32
- - Browser [e.g. stock browser, safari]
33
- - Version [e.g. 22]
34
-
35
- **Additional context** Add any other context about the problem here.
@@ -1,17 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
- ---
8
-
9
- **Is your feature request related to a problem? Please describe.** A clear and concise
10
- description of what the problem is. Ex. I'm always frustrated when [...]
11
-
12
- **Describe the solution you'd like** A clear and concise description of what you want to happen.
13
-
14
- **Describe alternatives you've considered** A clear and concise description of any alternative
15
- solutions or features you've considered.
16
-
17
- **Additional context** Add any other context or screenshots about the feature request here.