@haneullabs/wallet-standard 0.1.0

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.
Files changed (105) hide show
  1. package/CHANGELOG.md +1438 -0
  2. package/README.md +6 -0
  3. package/dist/cjs/chains.d.ts +16 -0
  4. package/dist/cjs/chains.js +42 -0
  5. package/dist/cjs/chains.js.map +7 -0
  6. package/dist/cjs/detect.d.ts +3 -0
  7. package/dist/cjs/detect.js +31 -0
  8. package/dist/cjs/detect.js.map +7 -0
  9. package/dist/cjs/features/haneulGetCapabilities.d.ts +15 -0
  10. package/dist/cjs/features/haneulGetCapabilities.js +25 -0
  11. package/dist/cjs/features/haneulGetCapabilities.js.map +7 -0
  12. package/dist/cjs/features/haneulReportTransactionEffects.d.ts +26 -0
  13. package/dist/cjs/features/haneulReportTransactionEffects.js +25 -0
  14. package/dist/cjs/features/haneulReportTransactionEffects.js.map +7 -0
  15. package/dist/cjs/features/haneulSignAndExecuteTransaction.d.ts +28 -0
  16. package/dist/cjs/features/haneulSignAndExecuteTransaction.js +25 -0
  17. package/dist/cjs/features/haneulSignAndExecuteTransaction.js.map +7 -0
  18. package/dist/cjs/features/haneulSignAndExecuteTransactionBlock.d.ts +36 -0
  19. package/dist/cjs/features/haneulSignAndExecuteTransactionBlock.js +25 -0
  20. package/dist/cjs/features/haneulSignAndExecuteTransactionBlock.js.map +7 -0
  21. package/dist/cjs/features/haneulSignMessage.d.ts +45 -0
  22. package/dist/cjs/features/haneulSignMessage.js +25 -0
  23. package/dist/cjs/features/haneulSignMessage.js.map +7 -0
  24. package/dist/cjs/features/haneulSignPersonalMessage.d.ts +33 -0
  25. package/dist/cjs/features/haneulSignPersonalMessage.js +25 -0
  26. package/dist/cjs/features/haneulSignPersonalMessage.js.map +7 -0
  27. package/dist/cjs/features/haneulSignTransaction.d.ts +34 -0
  28. package/dist/cjs/features/haneulSignTransaction.js +25 -0
  29. package/dist/cjs/features/haneulSignTransaction.js.map +7 -0
  30. package/dist/cjs/features/haneulSignTransactionBlock.d.ts +38 -0
  31. package/dist/cjs/features/haneulSignTransactionBlock.js +25 -0
  32. package/dist/cjs/features/haneulSignTransactionBlock.js.map +7 -0
  33. package/dist/cjs/features/index.d.ts +28 -0
  34. package/dist/cjs/features/index.js +26 -0
  35. package/dist/cjs/features/index.js.map +7 -0
  36. package/dist/cjs/index.d.ts +6 -0
  37. package/dist/cjs/index.js +32 -0
  38. package/dist/cjs/index.js.map +7 -0
  39. package/dist/cjs/package.json +5 -0
  40. package/dist/cjs/types.d.ts +159 -0
  41. package/dist/cjs/types.js +17 -0
  42. package/dist/cjs/types.js.map +7 -0
  43. package/dist/cjs/wallet.d.ts +18 -0
  44. package/dist/cjs/wallet.js +80 -0
  45. package/dist/cjs/wallet.js.map +7 -0
  46. package/dist/esm/chains.d.ts +16 -0
  47. package/dist/esm/chains.js +22 -0
  48. package/dist/esm/chains.js.map +7 -0
  49. package/dist/esm/detect.d.ts +3 -0
  50. package/dist/esm/detect.js +11 -0
  51. package/dist/esm/detect.js.map +7 -0
  52. package/dist/esm/features/haneulGetCapabilities.d.ts +15 -0
  53. package/dist/esm/features/haneulGetCapabilities.js +5 -0
  54. package/dist/esm/features/haneulGetCapabilities.js.map +7 -0
  55. package/dist/esm/features/haneulReportTransactionEffects.d.ts +26 -0
  56. package/dist/esm/features/haneulReportTransactionEffects.js +5 -0
  57. package/dist/esm/features/haneulReportTransactionEffects.js.map +7 -0
  58. package/dist/esm/features/haneulSignAndExecuteTransaction.d.ts +28 -0
  59. package/dist/esm/features/haneulSignAndExecuteTransaction.js +5 -0
  60. package/dist/esm/features/haneulSignAndExecuteTransaction.js.map +7 -0
  61. package/dist/esm/features/haneulSignAndExecuteTransactionBlock.d.ts +36 -0
  62. package/dist/esm/features/haneulSignAndExecuteTransactionBlock.js +5 -0
  63. package/dist/esm/features/haneulSignAndExecuteTransactionBlock.js.map +7 -0
  64. package/dist/esm/features/haneulSignMessage.d.ts +45 -0
  65. package/dist/esm/features/haneulSignMessage.js +5 -0
  66. package/dist/esm/features/haneulSignMessage.js.map +7 -0
  67. package/dist/esm/features/haneulSignPersonalMessage.d.ts +33 -0
  68. package/dist/esm/features/haneulSignPersonalMessage.js +5 -0
  69. package/dist/esm/features/haneulSignPersonalMessage.js.map +7 -0
  70. package/dist/esm/features/haneulSignTransaction.d.ts +34 -0
  71. package/dist/esm/features/haneulSignTransaction.js +5 -0
  72. package/dist/esm/features/haneulSignTransaction.js.map +7 -0
  73. package/dist/esm/features/haneulSignTransactionBlock.d.ts +38 -0
  74. package/dist/esm/features/haneulSignTransactionBlock.js +5 -0
  75. package/dist/esm/features/haneulSignTransactionBlock.js.map +7 -0
  76. package/dist/esm/features/index.d.ts +28 -0
  77. package/dist/esm/features/index.js +9 -0
  78. package/dist/esm/features/index.js.map +7 -0
  79. package/dist/esm/index.d.ts +6 -0
  80. package/dist/esm/index.js +11 -0
  81. package/dist/esm/index.js.map +7 -0
  82. package/dist/esm/package.json +5 -0
  83. package/dist/esm/types.d.ts +159 -0
  84. package/dist/esm/types.js +1 -0
  85. package/dist/esm/types.js.map +7 -0
  86. package/dist/esm/wallet.d.ts +18 -0
  87. package/dist/esm/wallet.js +60 -0
  88. package/dist/esm/wallet.js.map +7 -0
  89. package/dist/tsconfig.esm.tsbuildinfo +1 -0
  90. package/dist/tsconfig.tsbuildinfo +1 -0
  91. package/package.json +50 -0
  92. package/src/chains.ts +33 -0
  93. package/src/detect.ts +20 -0
  94. package/src/features/haneulGetCapabilities.ts +21 -0
  95. package/src/features/haneulReportTransactionEffects.ts +36 -0
  96. package/src/features/haneulSignAndExecuteTransaction.ts +38 -0
  97. package/src/features/haneulSignAndExecuteTransactionBlock.ts +51 -0
  98. package/src/features/haneulSignMessage.ts +54 -0
  99. package/src/features/haneulSignPersonalMessage.ts +44 -0
  100. package/src/features/haneulSignTransaction.ts +44 -0
  101. package/src/features/haneulSignTransactionBlock.ts +49 -0
  102. package/src/features/index.ts +61 -0
  103. package/src/index.ts +10 -0
  104. package/src/types.ts +175 -0
  105. package/src/wallet.ts +100 -0
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # `@haneullabs/wallet-standard`
2
+
3
+ A suite of standard utilities for implementing wallets and libraries based on the
4
+ [Wallet Standard](https://github.com/wallet-standard/wallet-standard/).
5
+
6
+ **Documentation:** https://docs.sui.io/standards/wallet-standard
@@ -0,0 +1,16 @@
1
+ import type { IdentifierString } from '@wallet-standard/core';
2
+ /** Haneul Devnet */
3
+ export declare const HANEUL_DEVNET_CHAIN = "haneul:devnet";
4
+ /** Haneul Testnet */
5
+ export declare const HANEUL_TESTNET_CHAIN = "haneul:testnet";
6
+ /** Haneul Localnet */
7
+ export declare const HANEUL_LOCALNET_CHAIN = "haneul:localnet";
8
+ /** Haneul Mainnet */
9
+ export declare const HANEUL_MAINNET_CHAIN = "haneul:mainnet";
10
+ export declare const HANEUL_CHAINS: readonly ["haneul:devnet", "haneul:testnet", "haneul:localnet", "haneul:mainnet"];
11
+ export type HaneulChain = (typeof HANEUL_CHAINS)[number];
12
+ /**
13
+ * Utility that returns whether or not a chain identifier is a valid Haneul chain.
14
+ * @param chain a chain identifier in the form of `${string}:{$string}`
15
+ */
16
+ export declare function isHaneulChain(chain: IdentifierString): chain is HaneulChain;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chains_exports = {};
20
+ __export(chains_exports, {
21
+ HANEUL_CHAINS: () => HANEUL_CHAINS,
22
+ HANEUL_DEVNET_CHAIN: () => HANEUL_DEVNET_CHAIN,
23
+ HANEUL_LOCALNET_CHAIN: () => HANEUL_LOCALNET_CHAIN,
24
+ HANEUL_MAINNET_CHAIN: () => HANEUL_MAINNET_CHAIN,
25
+ HANEUL_TESTNET_CHAIN: () => HANEUL_TESTNET_CHAIN,
26
+ isHaneulChain: () => isHaneulChain
27
+ });
28
+ module.exports = __toCommonJS(chains_exports);
29
+ const HANEUL_DEVNET_CHAIN = "haneul:devnet";
30
+ const HANEUL_TESTNET_CHAIN = "haneul:testnet";
31
+ const HANEUL_LOCALNET_CHAIN = "haneul:localnet";
32
+ const HANEUL_MAINNET_CHAIN = "haneul:mainnet";
33
+ const HANEUL_CHAINS = [
34
+ HANEUL_DEVNET_CHAIN,
35
+ HANEUL_TESTNET_CHAIN,
36
+ HANEUL_LOCALNET_CHAIN,
37
+ HANEUL_MAINNET_CHAIN
38
+ ];
39
+ function isHaneulChain(chain) {
40
+ return HANEUL_CHAINS.includes(chain);
41
+ }
42
+ //# sourceMappingURL=chains.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/chains.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { IdentifierString } from '@wallet-standard/core';\n\n/** Haneul Devnet */\nexport const HANEUL_DEVNET_CHAIN = 'haneul:devnet';\n\n/** Haneul Testnet */\nexport const HANEUL_TESTNET_CHAIN = 'haneul:testnet';\n\n/** Haneul Localnet */\nexport const HANEUL_LOCALNET_CHAIN = 'haneul:localnet';\n\n/** Haneul Mainnet */\nexport const HANEUL_MAINNET_CHAIN = 'haneul:mainnet';\n\nexport const HANEUL_CHAINS = [\n\tHANEUL_DEVNET_CHAIN,\n\tHANEUL_TESTNET_CHAIN,\n\tHANEUL_LOCALNET_CHAIN,\n\tHANEUL_MAINNET_CHAIN,\n] as const;\n\nexport type HaneulChain = (typeof HANEUL_CHAINS)[number];\n\n/**\n * Utility that returns whether or not a chain identifier is a valid Haneul chain.\n * @param chain a chain identifier in the form of `${string}:{$string}`\n */\nexport function isHaneulChain(chain: IdentifierString): chain is HaneulChain {\n\treturn HANEUL_CHAINS.includes(chain as HaneulChain);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,sBAAsB;AAG5B,MAAM,uBAAuB;AAG7B,MAAM,wBAAwB;AAG9B,MAAM,uBAAuB;AAE7B,MAAM,gBAAgB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAQO,SAAS,cAAc,OAA+C;AAC5E,SAAO,cAAc,SAAS,KAAoB;AACnD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { Wallet, WalletWithFeatures } from '@wallet-standard/core';
2
+ import type { MinimallyRequiredFeatures } from './features/index.js';
3
+ export declare function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(wallet: Wallet, additionalFeatures?: (keyof AdditionalFeatures)[]): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var detect_exports = {};
20
+ __export(detect_exports, {
21
+ isWalletWithRequiredFeatureSet: () => isWalletWithRequiredFeatureSet
22
+ });
23
+ module.exports = __toCommonJS(detect_exports);
24
+ var import_core = require("@wallet-standard/core");
25
+ const REQUIRED_FEATURES = [import_core.StandardConnect, import_core.StandardEvents];
26
+ function isWalletWithRequiredFeatureSet(wallet, additionalFeatures = []) {
27
+ return [...REQUIRED_FEATURES, ...additionalFeatures].every(
28
+ (feature) => feature in wallet.features
29
+ );
30
+ }
31
+ //# sourceMappingURL=detect.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/detect.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { StandardConnect, StandardEvents } from '@wallet-standard/core';\nimport type { Wallet, WalletWithFeatures } from '@wallet-standard/core';\n\nimport type { MinimallyRequiredFeatures } from './features/index.js';\n\n// These features are absolutely required for wallets to function in the Haneul ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [StandardConnect, StandardEvents];\n\nexport function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(\n\twallet: Wallet,\n\tadditionalFeatures: (keyof AdditionalFeatures)[] = [],\n): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures> {\n\treturn [...REQUIRED_FEATURES, ...additionalFeatures].every(\n\t\t(feature) => feature in wallet.features,\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAgD;AAOhD,MAAM,oBAAyD,CAAC,6BAAiB,0BAAc;AAExF,SAAS,+BACf,QACA,qBAAmD,CAAC,GAC2B;AAC/E,SAAO,CAAC,GAAG,mBAAmB,GAAG,kBAAkB,EAAE;AAAA,IACpD,CAAC,YAAY,WAAW,OAAO;AAAA,EAChC;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ export declare const HaneulGetCapabilities = "sui:getCapabilities";
2
+ /** The latest API version of the getCapabilities API. */
3
+ export type HaneulGetCapabilitiesVersion = '1.0.0';
4
+ /**
5
+ * A Wallet Standard feature for reporting intents supported by the wallet.
6
+ */
7
+ export type HaneulGetCapabilitiesFeature = {
8
+ [HaneulGetCapabilities]: {
9
+ version: HaneulGetCapabilitiesVersion;
10
+ getCapabilities: HaneulGetCapabilitiesMethod;
11
+ };
12
+ };
13
+ export type HaneulGetCapabilitiesMethod = () => Promise<{
14
+ supportedIntents?: string[];
15
+ }>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulGetCapabilities_exports = {};
20
+ __export(haneulGetCapabilities_exports, {
21
+ HaneulGetCapabilities: () => HaneulGetCapabilities
22
+ });
23
+ module.exports = __toCommonJS(haneulGetCapabilities_exports);
24
+ const HaneulGetCapabilities = "sui:getCapabilities";
25
+ //# sourceMappingURL=haneulGetCapabilities.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulGetCapabilities.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const HaneulGetCapabilities = 'sui:getCapabilities';\n\n/** The latest API version of the getCapabilities API. */\nexport type HaneulGetCapabilitiesVersion = '1.0.0';\n\n/**\n * A Wallet Standard feature for reporting intents supported by the wallet.\n */\nexport type HaneulGetCapabilitiesFeature = {\n\t[HaneulGetCapabilities]: {\n\t\tversion: HaneulGetCapabilitiesVersion;\n\t\tgetCapabilities: HaneulGetCapabilitiesMethod;\n\t};\n};\n\nexport type HaneulGetCapabilitiesMethod = () => Promise<{\n\tsupportedIntents?: string[];\n}>;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,wBAAwB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
+ /** Name of the feature. */
3
+ export declare const HaneulReportTransactionEffects = "sui:reportTransactionEffects";
4
+ /** The latest API version of the reportTransactionEffects API. */
5
+ export type HaneulReportTransactionEffectsVersion = '1.0.0';
6
+ /**
7
+ * A Wallet Standard feature for reporting the effects of a transaction block executed by a dapp
8
+ * The feature allows wallets to updated their caches using the effects of the transaction
9
+ * executed outside of the wallet
10
+ */
11
+ export type HaneulReportTransactionEffectsFeature = {
12
+ /** Namespace for the feature. */
13
+ [HaneulReportTransactionEffects]: {
14
+ /** Version of the feature API. */
15
+ version: HaneulReportTransactionEffectsVersion;
16
+ reportTransactionEffects: HaneulReportTransactionEffectsMethod;
17
+ };
18
+ };
19
+ export type HaneulReportTransactionEffectsMethod = (input: HaneulReportTransactionEffectsInput) => Promise<void>;
20
+ /** Input for signing transactions. */
21
+ export interface HaneulReportTransactionEffectsInput {
22
+ account: WalletAccount;
23
+ chain: IdentifierString;
24
+ /** Transaction effects as base64 encoded bcs. */
25
+ effects: string;
26
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulReportTransactionEffects_exports = {};
20
+ __export(haneulReportTransactionEffects_exports, {
21
+ HaneulReportTransactionEffects: () => HaneulReportTransactionEffects
22
+ });
23
+ module.exports = __toCommonJS(haneulReportTransactionEffects_exports);
24
+ const HaneulReportTransactionEffects = "sui:reportTransactionEffects";
25
+ //# sourceMappingURL=haneulReportTransactionEffects.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulReportTransactionEffects.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { IdentifierString, WalletAccount } from '@wallet-standard/core';\n\n/** Name of the feature. */\nexport const HaneulReportTransactionEffects = 'sui:reportTransactionEffects';\n\n/** The latest API version of the reportTransactionEffects API. */\nexport type HaneulReportTransactionEffectsVersion = '1.0.0';\n\n/**\n * A Wallet Standard feature for reporting the effects of a transaction block executed by a dapp\n * The feature allows wallets to updated their caches using the effects of the transaction\n * executed outside of the wallet\n */\nexport type HaneulReportTransactionEffectsFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulReportTransactionEffects]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulReportTransactionEffectsVersion;\n\t\treportTransactionEffects: HaneulReportTransactionEffectsMethod;\n\t};\n};\n\nexport type HaneulReportTransactionEffectsMethod = (\n\tinput: HaneulReportTransactionEffectsInput,\n) => Promise<void>;\n\n/** Input for signing transactions. */\nexport interface HaneulReportTransactionEffectsInput {\n\taccount: WalletAccount;\n\tchain: IdentifierString;\n\t/** Transaction effects as base64 encoded bcs. */\n\teffects: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,iCAAiC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,28 @@
1
+ import type { SignedTransaction, HaneulSignTransactionInput } from './haneulSignTransaction.js';
2
+ /** Name of the feature. */
3
+ export declare const HaneulSignAndExecuteTransaction = "sui:signAndExecuteTransaction";
4
+ /** The latest API version of the signAndExecuteTransactionBlock API. */
5
+ export type HaneulSignAndExecuteTransactionVersion = '2.0.0';
6
+ /**
7
+ * A Wallet Standard feature for signing a transaction, and submitting it to the
8
+ * network. The wallet is expected to submit the transaction to the network via RPC,
9
+ * and return the transaction response.
10
+ */
11
+ export type HaneulSignAndExecuteTransactionFeature = {
12
+ /** Namespace for the feature. */
13
+ [HaneulSignAndExecuteTransaction]: {
14
+ /** Version of the feature API. */
15
+ version: HaneulSignAndExecuteTransactionVersion;
16
+ signAndExecuteTransaction: HaneulSignAndExecuteTransactionMethod;
17
+ };
18
+ };
19
+ export type HaneulSignAndExecuteTransactionMethod = (input: HaneulSignAndExecuteTransactionInput) => Promise<HaneulSignAndExecuteTransactionOutput>;
20
+ /** Input for signing and sending transactions. */
21
+ export interface HaneulSignAndExecuteTransactionInput extends HaneulSignTransactionInput {
22
+ }
23
+ /** Output of signing and sending transactions. */
24
+ export interface HaneulSignAndExecuteTransactionOutput extends SignedTransaction {
25
+ digest: string;
26
+ /** Transaction effects as base64 encoded bcs. */
27
+ effects: string;
28
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulSignAndExecuteTransaction_exports = {};
20
+ __export(haneulSignAndExecuteTransaction_exports, {
21
+ HaneulSignAndExecuteTransaction: () => HaneulSignAndExecuteTransaction
22
+ });
23
+ module.exports = __toCommonJS(haneulSignAndExecuteTransaction_exports);
24
+ const HaneulSignAndExecuteTransaction = "sui:signAndExecuteTransaction";
25
+ //# sourceMappingURL=haneulSignAndExecuteTransaction.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulSignAndExecuteTransaction.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { SignedTransaction, HaneulSignTransactionInput } from './haneulSignTransaction.js';\n\n/** Name of the feature. */\nexport const HaneulSignAndExecuteTransaction = 'sui:signAndExecuteTransaction';\n\n/** The latest API version of the signAndExecuteTransactionBlock API. */\nexport type HaneulSignAndExecuteTransactionVersion = '2.0.0';\n\n/**\n * A Wallet Standard feature for signing a transaction, and submitting it to the\n * network. The wallet is expected to submit the transaction to the network via RPC,\n * and return the transaction response.\n */\nexport type HaneulSignAndExecuteTransactionFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulSignAndExecuteTransaction]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulSignAndExecuteTransactionVersion;\n\t\tsignAndExecuteTransaction: HaneulSignAndExecuteTransactionMethod;\n\t};\n};\n\nexport type HaneulSignAndExecuteTransactionMethod = (\n\tinput: HaneulSignAndExecuteTransactionInput,\n) => Promise<HaneulSignAndExecuteTransactionOutput>;\n\n/** Input for signing and sending transactions. */\nexport interface HaneulSignAndExecuteTransactionInput extends HaneulSignTransactionInput {}\n\n/** Output of signing and sending transactions. */\nexport interface HaneulSignAndExecuteTransactionOutput extends SignedTransaction {\n\tdigest: string;\n\t/** Transaction effects as base64 encoded bcs. */\n\teffects: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,kCAAkC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,36 @@
1
+ import type { ExecuteTransactionRequestType, HaneulTransactionBlockResponse, HaneulTransactionBlockResponseOptions } from '@haneullabs/haneul/client';
2
+ import type { HaneulSignTransactionBlockInput } from './haneulSignTransactionBlock.js';
3
+ /** Name of the feature. */
4
+ export declare const HaneulSignAndExecuteTransactionBlock = "sui:signAndExecuteTransactionBlock";
5
+ /** The latest API version of the signAndExecuteTransactionBlock API. */
6
+ export type HaneulSignAndExecuteTransactionBlockVersion = '1.0.0';
7
+ /**
8
+ * @deprecated Use `sui:signAndExecuteTransaction` instead.
9
+ *
10
+ * A Wallet Standard feature for signing a transaction, and submitting it to the
11
+ * network. The wallet is expected to submit the transaction to the network via RPC,
12
+ * and return the transaction response.
13
+ */
14
+ export type HaneulSignAndExecuteTransactionBlockFeature = {
15
+ /** Namespace for the feature. */
16
+ [HaneulSignAndExecuteTransactionBlock]: {
17
+ /** Version of the feature API. */
18
+ version: HaneulSignAndExecuteTransactionBlockVersion;
19
+ /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
20
+ signAndExecuteTransactionBlock: HaneulSignAndExecuteTransactionBlockMethod;
21
+ };
22
+ };
23
+ /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
24
+ export type HaneulSignAndExecuteTransactionBlockMethod = (input: HaneulSignAndExecuteTransactionBlockInput) => Promise<HaneulSignAndExecuteTransactionBlockOutput>;
25
+ /** Input for signing and sending transactions. */
26
+ export interface HaneulSignAndExecuteTransactionBlockInput extends HaneulSignTransactionBlockInput {
27
+ /**
28
+ * @deprecated requestType will be ignored by JSON RPC in the future
29
+ */
30
+ requestType?: ExecuteTransactionRequestType;
31
+ /** specify which fields to return (e.g., transaction, effects, events, etc). By default, only the transaction digest will be returned. */
32
+ options?: HaneulTransactionBlockResponseOptions;
33
+ }
34
+ /** Output of signing and sending transactions. */
35
+ export interface HaneulSignAndExecuteTransactionBlockOutput extends HaneulTransactionBlockResponse {
36
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulSignAndExecuteTransactionBlock_exports = {};
20
+ __export(haneulSignAndExecuteTransactionBlock_exports, {
21
+ HaneulSignAndExecuteTransactionBlock: () => HaneulSignAndExecuteTransactionBlock
22
+ });
23
+ module.exports = __toCommonJS(haneulSignAndExecuteTransactionBlock_exports);
24
+ const HaneulSignAndExecuteTransactionBlock = "sui:signAndExecuteTransactionBlock";
25
+ //# sourceMappingURL=haneulSignAndExecuteTransactionBlock.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulSignAndExecuteTransactionBlock.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExecuteTransactionRequestType,\n\tHaneulTransactionBlockResponse,\n\tHaneulTransactionBlockResponseOptions,\n} from '@haneullabs/haneul/client';\n\nimport type { HaneulSignTransactionBlockInput } from './haneulSignTransactionBlock.js';\n\n/** Name of the feature. */\nexport const HaneulSignAndExecuteTransactionBlock = 'sui:signAndExecuteTransactionBlock';\n\n/** The latest API version of the signAndExecuteTransactionBlock API. */\nexport type HaneulSignAndExecuteTransactionBlockVersion = '1.0.0';\n\n/**\n * @deprecated Use `sui:signAndExecuteTransaction` instead.\n *\n * A Wallet Standard feature for signing a transaction, and submitting it to the\n * network. The wallet is expected to submit the transaction to the network via RPC,\n * and return the transaction response.\n */\nexport type HaneulSignAndExecuteTransactionBlockFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulSignAndExecuteTransactionBlock]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulSignAndExecuteTransactionBlockVersion;\n\t\t/** @deprecated Use `sui:signAndExecuteTransaction` instead. */\n\t\tsignAndExecuteTransactionBlock: HaneulSignAndExecuteTransactionBlockMethod;\n\t};\n};\n\n/** @deprecated Use `sui:signAndExecuteTransaction` instead. */\nexport type HaneulSignAndExecuteTransactionBlockMethod = (\n\tinput: HaneulSignAndExecuteTransactionBlockInput,\n) => Promise<HaneulSignAndExecuteTransactionBlockOutput>;\n\n/** Input for signing and sending transactions. */\nexport interface HaneulSignAndExecuteTransactionBlockInput extends HaneulSignTransactionBlockInput {\n\t/**\n\t * @deprecated requestType will be ignored by JSON RPC in the future\n\t */\n\trequestType?: ExecuteTransactionRequestType;\n\t/** specify which fields to return (e.g., transaction, effects, events, etc). By default, only the transaction digest will be returned. */\n\toptions?: HaneulTransactionBlockResponseOptions;\n}\n\n/** Output of signing and sending transactions. */\nexport interface HaneulSignAndExecuteTransactionBlockOutput extends HaneulTransactionBlockResponse {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,MAAM,uCAAuC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,45 @@
1
+ import type { WalletAccount } from '@wallet-standard/core';
2
+ /**
3
+ * Name of the feature.
4
+ * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
5
+ **/
6
+ export declare const HaneulSignMessage = "sui:signMessage";
7
+ /**
8
+ * The latest API version of the signMessage API.
9
+ * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
10
+ */
11
+ export type HaneulSignMessageVersion = '1.0.0';
12
+ /**
13
+ * A Wallet Standard feature for signing a personal message, and returning the
14
+ * message bytes that were signed, and message signature.
15
+ *
16
+ * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
17
+ */
18
+ export type HaneulSignMessageFeature = {
19
+ /** Namespace for the feature. */
20
+ [HaneulSignMessage]: {
21
+ /** Version of the feature API. */
22
+ version: HaneulSignMessageVersion;
23
+ signMessage: HaneulSignMessageMethod;
24
+ };
25
+ };
26
+ /** @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature */
27
+ export type HaneulSignMessageMethod = (input: HaneulSignMessageInput) => Promise<HaneulSignMessageOutput>;
28
+ /**
29
+ * Input for signing messages.
30
+ * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
31
+ */
32
+ export interface HaneulSignMessageInput {
33
+ message: Uint8Array;
34
+ account: WalletAccount;
35
+ }
36
+ /**
37
+ * Output of signing messages.
38
+ * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
39
+ */
40
+ export interface HaneulSignMessageOutput {
41
+ /** Base64 message bytes. */
42
+ messageBytes: string;
43
+ /** Base64 encoded signature */
44
+ signature: string;
45
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulSignMessage_exports = {};
20
+ __export(haneulSignMessage_exports, {
21
+ HaneulSignMessage: () => HaneulSignMessage
22
+ });
23
+ module.exports = __toCommonJS(haneulSignMessage_exports);
24
+ const HaneulSignMessage = "sui:signMessage";
25
+ //# sourceMappingURL=haneulSignMessage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulSignMessage.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { WalletAccount } from '@wallet-standard/core';\n\n/**\n * Name of the feature.\n * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature\n **/\nexport const HaneulSignMessage = 'sui:signMessage';\n\n/**\n * The latest API version of the signMessage API.\n * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature\n */\nexport type HaneulSignMessageVersion = '1.0.0';\n\n/**\n * A Wallet Standard feature for signing a personal message, and returning the\n * message bytes that were signed, and message signature.\n *\n * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature\n */\nexport type HaneulSignMessageFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulSignMessage]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulSignMessageVersion;\n\t\tsignMessage: HaneulSignMessageMethod;\n\t};\n};\n\n/** @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature */\nexport type HaneulSignMessageMethod = (input: HaneulSignMessageInput) => Promise<HaneulSignMessageOutput>;\n\n/**\n * Input for signing messages.\n * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature\n */\nexport interface HaneulSignMessageInput {\n\tmessage: Uint8Array;\n\taccount: WalletAccount;\n}\n\n/**\n * Output of signing messages.\n * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature\n */\nexport interface HaneulSignMessageOutput {\n\t/** Base64 message bytes. */\n\tmessageBytes: string;\n\t/** Base64 encoded signature */\n\tsignature: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,MAAM,oBAAoB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,33 @@
1
+ import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
+ /** Name of the feature. */
3
+ export declare const HaneulSignPersonalMessage = "sui:signPersonalMessage";
4
+ /** The latest API version of the signPersonalMessage API. */
5
+ export type HaneulSignPersonalMessageVersion = '1.1.0';
6
+ /**
7
+ * A Wallet Standard feature for signing a personal message, and returning the
8
+ * message bytes that were signed, and message signature.
9
+ */
10
+ export type HaneulSignPersonalMessageFeature = {
11
+ /** Namespace for the feature. */
12
+ [HaneulSignPersonalMessage]: {
13
+ /** Version of the feature API. */
14
+ version: HaneulSignPersonalMessageVersion;
15
+ signPersonalMessage: HaneulSignPersonalMessageMethod;
16
+ };
17
+ };
18
+ export type HaneulSignPersonalMessageMethod = (input: HaneulSignPersonalMessageInput) => Promise<HaneulSignPersonalMessageOutput>;
19
+ /** Input for signing personal messages. */
20
+ export interface HaneulSignPersonalMessageInput {
21
+ message: Uint8Array;
22
+ account: WalletAccount;
23
+ chain?: IdentifierString;
24
+ }
25
+ /** Output of signing personal messages. */
26
+ export interface HaneulSignPersonalMessageOutput extends SignedPersonalMessage {
27
+ }
28
+ export interface SignedPersonalMessage {
29
+ /** Base64 encoded message bytes */
30
+ bytes: string;
31
+ /** Base64 encoded signature */
32
+ signature: string;
33
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulSignPersonalMessage_exports = {};
20
+ __export(haneulSignPersonalMessage_exports, {
21
+ HaneulSignPersonalMessage: () => HaneulSignPersonalMessage
22
+ });
23
+ module.exports = __toCommonJS(haneulSignPersonalMessage_exports);
24
+ const HaneulSignPersonalMessage = "sui:signPersonalMessage";
25
+ //# sourceMappingURL=haneulSignPersonalMessage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulSignPersonalMessage.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { IdentifierString, WalletAccount } from '@wallet-standard/core';\n\n/** Name of the feature. */\nexport const HaneulSignPersonalMessage = 'sui:signPersonalMessage';\n\n/** The latest API version of the signPersonalMessage API. */\nexport type HaneulSignPersonalMessageVersion = '1.1.0';\n\n/**\n * A Wallet Standard feature for signing a personal message, and returning the\n * message bytes that were signed, and message signature.\n */\nexport type HaneulSignPersonalMessageFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulSignPersonalMessage]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulSignPersonalMessageVersion;\n\t\tsignPersonalMessage: HaneulSignPersonalMessageMethod;\n\t};\n};\n\nexport type HaneulSignPersonalMessageMethod = (\n\tinput: HaneulSignPersonalMessageInput,\n) => Promise<HaneulSignPersonalMessageOutput>;\n\n/** Input for signing personal messages. */\nexport interface HaneulSignPersonalMessageInput {\n\tmessage: Uint8Array;\n\taccount: WalletAccount;\n\tchain?: IdentifierString;\n}\n\n/** Output of signing personal messages. */\nexport interface HaneulSignPersonalMessageOutput extends SignedPersonalMessage {}\n\nexport interface SignedPersonalMessage {\n\t/** Base64 encoded message bytes */\n\tbytes: string;\n\t/** Base64 encoded signature */\n\tsignature: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,4BAA4B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,34 @@
1
+ import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
+ /** Name of the feature. */
3
+ export declare const HaneulSignTransaction = "sui:signTransaction";
4
+ /** The latest API version of the signTransaction API. */
5
+ export type HaneulSignTransactionVersion = '2.0.0';
6
+ /**
7
+ * A Wallet Standard feature for signing a transaction, and returning the
8
+ * serialized transaction and transaction signature.
9
+ */
10
+ export type HaneulSignTransactionFeature = {
11
+ /** Namespace for the feature. */
12
+ [HaneulSignTransaction]: {
13
+ /** Version of the feature API. */
14
+ version: HaneulSignTransactionVersion;
15
+ signTransaction: HaneulSignTransactionMethod;
16
+ };
17
+ };
18
+ export type HaneulSignTransactionMethod = (input: HaneulSignTransactionInput) => Promise<SignedTransaction>;
19
+ /** Input for signing transactions. */
20
+ export interface HaneulSignTransactionInput {
21
+ transaction: {
22
+ toJSON: () => Promise<string>;
23
+ };
24
+ account: WalletAccount;
25
+ chain: IdentifierString;
26
+ signal?: AbortSignal;
27
+ }
28
+ /** Output of signing transactions. */
29
+ export interface SignedTransaction {
30
+ /** Transaction as base64 encoded bcs. */
31
+ bytes: string;
32
+ /** Base64 encoded signature */
33
+ signature: string;
34
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var haneulSignTransaction_exports = {};
20
+ __export(haneulSignTransaction_exports, {
21
+ HaneulSignTransaction: () => HaneulSignTransaction
22
+ });
23
+ module.exports = __toCommonJS(haneulSignTransaction_exports);
24
+ const HaneulSignTransaction = "sui:signTransaction";
25
+ //# sourceMappingURL=haneulSignTransaction.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/haneulSignTransaction.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { IdentifierString, WalletAccount } from '@wallet-standard/core';\n\n/** Name of the feature. */\nexport const HaneulSignTransaction = 'sui:signTransaction';\n\n/** The latest API version of the signTransaction API. */\nexport type HaneulSignTransactionVersion = '2.0.0';\n\n/**\n * A Wallet Standard feature for signing a transaction, and returning the\n * serialized transaction and transaction signature.\n */\nexport type HaneulSignTransactionFeature = {\n\t/** Namespace for the feature. */\n\t[HaneulSignTransaction]: {\n\t\t/** Version of the feature API. */\n\t\tversion: HaneulSignTransactionVersion;\n\t\tsignTransaction: HaneulSignTransactionMethod;\n\t};\n};\n\nexport type HaneulSignTransactionMethod = (\n\tinput: HaneulSignTransactionInput,\n) => Promise<SignedTransaction>;\n\n/** Input for signing transactions. */\nexport interface HaneulSignTransactionInput {\n\ttransaction: { toJSON: () => Promise<string> };\n\taccount: WalletAccount;\n\tchain: IdentifierString;\n\tsignal?: AbortSignal;\n}\n\n/** Output of signing transactions. */\n\nexport interface SignedTransaction {\n\t/** Transaction as base64 encoded bcs. */\n\tbytes: string;\n\t/** Base64 encoded signature */\n\tsignature: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,wBAAwB;",
6
+ "names": []
7
+ }