@mysten/wallet-standard 0.11.5 → 0.12.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 (76) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/detect.d.ts +1 -5
  3. package/dist/cjs/detect.js +1 -5
  4. package/dist/cjs/detect.js.map +2 -2
  5. package/dist/cjs/features/index.d.ts +9 -2
  6. package/dist/cjs/features/index.js +3 -0
  7. package/dist/cjs/features/index.js.map +2 -2
  8. package/dist/cjs/features/suiReportTransactionEffects.d.ts +22 -0
  9. package/dist/cjs/features/suiReportTransactionEffects.js +17 -0
  10. package/dist/cjs/features/suiReportTransactionEffects.js.map +7 -0
  11. package/dist/cjs/features/suiSignAndExecuteTransaction.d.ts +26 -0
  12. package/dist/cjs/features/suiSignAndExecuteTransaction.js +17 -0
  13. package/dist/cjs/features/suiSignAndExecuteTransaction.js.map +7 -0
  14. package/dist/cjs/features/suiSignAndExecuteTransactionBlock.d.ts +5 -1
  15. package/dist/cjs/features/suiSignAndExecuteTransactionBlock.js.map +1 -1
  16. package/dist/cjs/features/suiSignMessage.d.ts +2 -0
  17. package/dist/cjs/features/suiSignMessage.js.map +1 -1
  18. package/dist/cjs/features/suiSignPersonalMessage.d.ts +2 -0
  19. package/dist/cjs/features/suiSignPersonalMessage.js.map +1 -1
  20. package/dist/cjs/features/suiSignTransaction.d.ts +32 -0
  21. package/dist/cjs/features/suiSignTransaction.js +17 -0
  22. package/dist/cjs/features/suiSignTransaction.js.map +7 -0
  23. package/dist/cjs/features/suiSignTransactionBlock.d.ts +8 -2
  24. package/dist/cjs/features/suiSignTransactionBlock.js.map +1 -1
  25. package/dist/cjs/index.d.ts +2 -1
  26. package/dist/cjs/index.js +10 -0
  27. package/dist/cjs/index.js.map +2 -2
  28. package/dist/cjs/types.d.ts +148 -0
  29. package/dist/cjs/types.js +17 -0
  30. package/dist/cjs/types.js.map +7 -0
  31. package/dist/cjs/wallet.d.ts +7 -0
  32. package/dist/cjs/wallet.js +61 -0
  33. package/dist/cjs/wallet.js.map +2 -2
  34. package/dist/esm/detect.d.ts +1 -5
  35. package/dist/esm/detect.js +1 -5
  36. package/dist/esm/detect.js.map +2 -2
  37. package/dist/esm/features/index.d.ts +9 -2
  38. package/dist/esm/features/index.js +3 -0
  39. package/dist/esm/features/index.js.map +2 -2
  40. package/dist/esm/features/suiReportTransactionEffects.d.ts +22 -0
  41. package/dist/esm/features/suiReportTransactionEffects.js +1 -0
  42. package/dist/esm/features/suiReportTransactionEffects.js.map +7 -0
  43. package/dist/esm/features/suiSignAndExecuteTransaction.d.ts +26 -0
  44. package/dist/esm/features/suiSignAndExecuteTransaction.js +1 -0
  45. package/dist/esm/features/suiSignAndExecuteTransaction.js.map +7 -0
  46. package/dist/esm/features/suiSignAndExecuteTransactionBlock.d.ts +5 -1
  47. package/dist/esm/features/suiSignMessage.d.ts +2 -0
  48. package/dist/esm/features/suiSignPersonalMessage.d.ts +2 -0
  49. package/dist/esm/features/suiSignTransaction.d.ts +32 -0
  50. package/dist/esm/features/suiSignTransaction.js +1 -0
  51. package/dist/esm/features/suiSignTransaction.js.map +7 -0
  52. package/dist/esm/features/suiSignTransactionBlock.d.ts +8 -2
  53. package/dist/esm/index.d.ts +2 -1
  54. package/dist/esm/index.js +6 -0
  55. package/dist/esm/index.js.map +2 -2
  56. package/dist/esm/types.d.ts +148 -0
  57. package/dist/esm/types.js +1 -0
  58. package/dist/esm/types.js.map +7 -0
  59. package/dist/esm/wallet.d.ts +7 -0
  60. package/dist/esm/wallet.js +57 -0
  61. package/dist/esm/wallet.js.map +3 -3
  62. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  63. package/dist/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +2 -2
  65. package/src/detect.ts +1 -10
  66. package/src/features/index.ts +20 -11
  67. package/src/features/suiReportTransactionEffects.ts +30 -0
  68. package/src/features/suiSignAndExecuteTransaction.ts +35 -0
  69. package/src/features/suiSignAndExecuteTransactionBlock.ts +5 -1
  70. package/src/features/suiSignMessage.ts +2 -0
  71. package/src/features/suiSignPersonalMessage.ts +2 -0
  72. package/src/features/suiSignTransaction.ts +41 -0
  73. package/src/features/suiSignTransactionBlock.ts +8 -2
  74. package/src/index.ts +2 -1
  75. package/src/types.ts +170 -0
  76. package/src/wallet.ts +83 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mysten/wallet-standard
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features and breaking changes.
8
+ See the [full migration guide](https://sdk.mystenlabs.com/typescript/migrations/sui-1.0) for details on how to upgrade.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [ebdfe7cf21]
13
+ - Updated dependencies [a92b03de42]
14
+ - @mysten/sui@1.0.0
15
+
16
+ ## 0.11.6
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [99b112178c]
21
+ - @mysten/sui.js@0.54.1
22
+
3
23
  ## 0.11.5
4
24
 
5
25
  ### Patch Changes
@@ -1,7 +1,3 @@
1
1
  import type { Wallet, WalletWithFeatures } from '@wallet-standard/core';
2
- import type { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features/index.js';
3
- /** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */
4
- export declare function isWalletWithSuiFeatures(wallet: Wallet,
5
- /** Extra features that are required to be present, in addition to the expected feature set. */
6
- features?: string[]): wallet is WalletWithSuiFeatures;
2
+ import type { MinimallyRequiredFeatures } from './features/index.js';
7
3
  export declare function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(wallet: Wallet, additionalFeatures?: (keyof AdditionalFeatures)[]): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures>;
@@ -18,17 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var detect_exports = {};
20
20
  __export(detect_exports, {
21
- isWalletWithRequiredFeatureSet: () => isWalletWithRequiredFeatureSet,
22
- isWalletWithSuiFeatures: () => isWalletWithSuiFeatures
21
+ isWalletWithRequiredFeatureSet: () => isWalletWithRequiredFeatureSet
23
22
  });
24
23
  module.exports = __toCommonJS(detect_exports);
25
24
  const REQUIRED_FEATURES = [
26
25
  "standard:connect",
27
26
  "standard:events"
28
27
  ];
29
- function isWalletWithSuiFeatures(wallet, features = []) {
30
- return [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);
31
- }
32
28
  function isWalletWithRequiredFeatureSet(wallet, additionalFeatures = []) {
33
29
  return [...REQUIRED_FEATURES, ...additionalFeatures].every(
34
30
  (feature) => feature in wallet.features
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/detect.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Wallet, WalletWithFeatures } from '@wallet-standard/core';\n\nimport type { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features/index.js';\n\n// These features are absolutely required for wallets to function in the Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [\n\t'standard:connect',\n\t'standard:events',\n];\n\n/** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */\nexport function isWalletWithSuiFeatures(\n\twallet: Wallet,\n\t/** Extra features that are required to be present, in addition to the expected feature set. */\n\tfeatures: string[] = [],\n): wallet is WalletWithSuiFeatures {\n\treturn [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);\n}\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;AAAA;AASA,MAAM,oBAAyD;AAAA,EAC9D;AAAA,EACA;AACD;AAGO,SAAS,wBACf,QAEA,WAAqB,CAAC,GACY;AAClC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,YAAY,WAAW,OAAO,QAAQ;AACzF;AAEO,SAAS,+BACf,QACA,qBAAmD,CAAC,GAC2B;AAC/E,SAAO,CAAC,GAAG,mBAAmB,GAAG,kBAAkB,EAAE;AAAA,IACpD,CAAC,YAAY,WAAW,OAAO;AAAA,EAChC;AACD;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\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 Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [\n\t'standard:connect',\n\t'standard:events',\n];\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;AASA,MAAM,oBAAyD;AAAA,EAC9D;AAAA,EACA;AACD;AAEO,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
6
  "names": []
7
7
  }
@@ -1,13 +1,17 @@
1
1
  import type { IdentifierRecord, StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, WalletWithFeatures } from '@wallet-standard/core';
2
+ import type { SuiReportTransactionEffectsFeature } from './suiReportTransactionEffects.js';
3
+ import type { SuiSignAndExecuteTransactionFeature } from './suiSignAndExecuteTransaction.js';
2
4
  import type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock.js';
3
5
  import type { SuiSignMessageFeature } from './suiSignMessage.js';
4
6
  import type { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage.js';
7
+ import type { SuiSignTransactionFeature } from './suiSignTransaction.js';
5
8
  import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock.js';
6
9
  /**
7
10
  * Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.
8
11
  */
9
- export type SuiFeatures = SuiSignTransactionBlockFeature & SuiSignAndExecuteTransactionBlockFeature & SuiSignPersonalMessageFeature & Partial<SuiSignMessageFeature>;
10
- export type WalletWithSuiFeatures = WalletWithFeatures<StandardConnectFeature & StandardEventsFeature & SuiFeatures & Partial<StandardDisconnectFeature>>;
12
+ export type SuiFeatures = Partial<SuiSignTransactionBlockFeature> & Partial<SuiSignAndExecuteTransactionBlockFeature> & SuiSignPersonalMessageFeature & SuiSignAndExecuteTransactionFeature & SuiSignTransactionFeature & Partial<SuiSignMessageFeature> & Partial<SuiReportTransactionEffectsFeature>;
13
+ export type SuiWalletFeatures = StandardConnectFeature & StandardEventsFeature & SuiFeatures & Partial<StandardDisconnectFeature>;
14
+ export type WalletWithSuiFeatures = WalletWithFeatures<SuiWalletFeatures>;
11
15
  /**
12
16
  * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.
13
17
  */
@@ -15,5 +19,8 @@ export type WalletWithRequiredFeatures = WalletWithFeatures<MinimallyRequiredFea
15
19
  export type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;
16
20
  export * from './suiSignMessage.js';
17
21
  export * from './suiSignTransactionBlock.js';
22
+ export * from './suiSignTransaction.js';
18
23
  export * from './suiSignAndExecuteTransactionBlock.js';
24
+ export * from './suiSignAndExecuteTransaction.js';
19
25
  export * from './suiSignPersonalMessage.js';
26
+ export * from './suiReportTransactionEffects.js';
@@ -17,6 +17,9 @@ var features_exports = {};
17
17
  module.exports = __toCommonJS(features_exports);
18
18
  __reExport(features_exports, require("./suiSignMessage.js"), module.exports);
19
19
  __reExport(features_exports, require("./suiSignTransactionBlock.js"), module.exports);
20
+ __reExport(features_exports, require("./suiSignTransaction.js"), module.exports);
20
21
  __reExport(features_exports, require("./suiSignAndExecuteTransactionBlock.js"), module.exports);
22
+ __reExport(features_exports, require("./suiSignAndExecuteTransaction.js"), module.exports);
21
23
  __reExport(features_exports, require("./suiSignPersonalMessage.js"), module.exports);
24
+ __reExport(features_exports, require("./suiReportTransactionEffects.js"), module.exports);
22
25
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tIdentifierRecord,\n\tStandardConnectFeature,\n\tStandardDisconnectFeature,\n\tStandardEventsFeature,\n\tWalletWithFeatures,\n} from '@wallet-standard/core';\n\nimport type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock.js';\nimport type { SuiSignMessageFeature } from './suiSignMessage.js';\nimport type { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage.js';\nimport type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock.js';\n\n/**\n * Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.\n */\nexport type SuiFeatures = SuiSignTransactionBlockFeature &\n\tSuiSignAndExecuteTransactionBlockFeature &\n\tSuiSignPersonalMessageFeature &\n\t// This deprecated feature should be removed once wallets update to the new method:\n\tPartial<SuiSignMessageFeature>;\n\nexport type WalletWithSuiFeatures = WalletWithFeatures<\n\tStandardConnectFeature &\n\t\tStandardEventsFeature &\n\t\tSuiFeatures &\n\t\t// Disconnect is an optional feature:\n\t\tPartial<StandardDisconnectFeature>\n>;\n\n/**\n * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.\n */\nexport type WalletWithRequiredFeatures = WalletWithFeatures<\n\tMinimallyRequiredFeatures &\n\t\tPartial<SuiFeatures> &\n\t\tPartial<StandardDisconnectFeature> &\n\t\tIdentifierRecord<unknown>\n>;\n\nexport type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;\n\nexport * from './suiSignMessage.js';\nexport * from './suiSignTransactionBlock.js';\nexport * from './suiSignAndExecuteTransactionBlock.js';\nexport * from './suiSignPersonalMessage.js';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AA6CA,6BAAc,gCA7Cd;AA8CA,6BAAc,yCA9Cd;AA+CA,6BAAc,mDA/Cd;AAgDA,6BAAc,wCAhDd;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tIdentifierRecord,\n\tStandardConnectFeature,\n\tStandardDisconnectFeature,\n\tStandardEventsFeature,\n\tWalletWithFeatures,\n} from '@wallet-standard/core';\n\nimport type { SuiReportTransactionEffectsFeature } from './suiReportTransactionEffects.js';\nimport type { SuiSignAndExecuteTransactionFeature } from './suiSignAndExecuteTransaction.js';\nimport type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock.js';\nimport type { SuiSignMessageFeature } from './suiSignMessage.js';\nimport type { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage.js';\nimport type { SuiSignTransactionFeature } from './suiSignTransaction.js';\nimport type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock.js';\n\n/**\n * Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.\n */\nexport type SuiFeatures = Partial<SuiSignTransactionBlockFeature> &\n\tPartial<SuiSignAndExecuteTransactionBlockFeature> &\n\tSuiSignPersonalMessageFeature &\n\tSuiSignAndExecuteTransactionFeature &\n\tSuiSignTransactionFeature &\n\t// This deprecated feature should be removed once wallets update to the new method:\n\tPartial<SuiSignMessageFeature> &\n\tPartial<SuiReportTransactionEffectsFeature>;\n\nexport type SuiWalletFeatures = StandardConnectFeature &\n\tStandardEventsFeature &\n\tSuiFeatures &\n\t// Disconnect is an optional feature:\n\tPartial<StandardDisconnectFeature>;\n\nexport type WalletWithSuiFeatures = WalletWithFeatures<SuiWalletFeatures>;\n\n/**\n * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.\n */\nexport type WalletWithRequiredFeatures = WalletWithFeatures<\n\tMinimallyRequiredFeatures &\n\t\tPartial<SuiFeatures> &\n\t\tPartial<StandardDisconnectFeature> &\n\t\tIdentifierRecord<unknown>\n>;\n\nexport type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;\n\nexport * from './suiSignMessage.js';\nexport * from './suiSignTransactionBlock.js';\nexport * from './suiSignTransaction.js';\nexport * from './suiSignAndExecuteTransactionBlock.js';\nexport * from './suiSignAndExecuteTransaction.js';\nexport * from './suiSignPersonalMessage.js';\nexport * from './suiReportTransactionEffects.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAmDA,6BAAc,gCAnDd;AAoDA,6BAAc,yCApDd;AAqDA,6BAAc,oCArDd;AAsDA,6BAAc,mDAtDd;AAuDA,6BAAc,8CAvDd;AAwDA,6BAAc,wCAxDd;AAyDA,6BAAc,6CAzDd;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,22 @@
1
+ import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
+ /**
3
+ * A Wallet Standard feature for reporting the effects of a transaction block executed by a dapp
4
+ * The feature allows wallets to updated their caches using the effects of the transaction
5
+ * executed outside of the wallet
6
+ */
7
+ export type SuiReportTransactionEffectsFeature = {
8
+ /** Namespace for the feature. */
9
+ 'sui:reportTransactionEffects': {
10
+ /** Version of the feature API. */
11
+ version: '1.0.0';
12
+ reportTransactionEffects: SuiReportTransactionEffectsMethod;
13
+ };
14
+ };
15
+ export type SuiReportTransactionEffectsMethod = (input: SuiReportTransactionEffectsInput) => Promise<void>;
16
+ /** Input for signing transactions. */
17
+ export interface SuiReportTransactionEffectsInput {
18
+ account: WalletAccount;
19
+ chain: IdentifierString;
20
+ /** Transaction effects as base64 encoded bcs. */
21
+ effects: string;
22
+ }
@@ -0,0 +1,17 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var suiReportTransactionEffects_exports = {};
16
+ module.exports = __toCommonJS(suiReportTransactionEffects_exports);
17
+ //# sourceMappingURL=suiReportTransactionEffects.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/suiReportTransactionEffects.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/**\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 SuiReportTransactionEffectsFeature = {\n\t/** Namespace for the feature. */\n\t'sui:reportTransactionEffects': {\n\t\t/** Version of the feature API. */\n\t\tversion: '1.0.0';\n\t\treportTransactionEffects: SuiReportTransactionEffectsMethod;\n\t};\n};\n\nexport type SuiReportTransactionEffectsMethod = (\n\tinput: SuiReportTransactionEffectsInput,\n) => Promise<void>;\n\n/** Input for signing transactions. */\nexport interface SuiReportTransactionEffectsInput {\n\taccount: WalletAccount;\n\tchain: IdentifierString;\n\t/** Transaction effects as base64 encoded bcs. */\n\teffects: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ import type { SignedTransaction, SuiSignTransactionInput } from './suiSignTransaction.js';
2
+ /** The latest API version of the signAndExecuteTransactionBlock API. */
3
+ export type SuiSignAndExecuteTransactionVersion = '2.0.0';
4
+ /**
5
+ * A Wallet Standard feature for signing a transaction, and submitting it to the
6
+ * network. The wallet is expected to submit the transaction to the network via RPC,
7
+ * and return the transaction response.
8
+ */
9
+ export type SuiSignAndExecuteTransactionFeature = {
10
+ /** Namespace for the feature. */
11
+ 'sui:signAndExecuteTransaction': {
12
+ /** Version of the feature API. */
13
+ version: SuiSignAndExecuteTransactionVersion;
14
+ signAndExecuteTransaction: SuiSignAndExecuteTransactionMethod;
15
+ };
16
+ };
17
+ export type SuiSignAndExecuteTransactionMethod = (input: SuiSignAndExecuteTransactionInput) => Promise<SuiSignAndExecuteTransactionOutput>;
18
+ /** Input for signing and sending transactions. */
19
+ export interface SuiSignAndExecuteTransactionInput extends SuiSignTransactionInput {
20
+ }
21
+ /** Output of signing and sending transactions. */
22
+ export interface SuiSignAndExecuteTransactionOutput extends SignedTransaction {
23
+ digest: string;
24
+ /** Transaction effects as base64 encoded bcs. */
25
+ effects: string;
26
+ }
@@ -0,0 +1,17 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var suiSignAndExecuteTransaction_exports = {};
16
+ module.exports = __toCommonJS(suiSignAndExecuteTransaction_exports);
17
+ //# sourceMappingURL=suiSignAndExecuteTransaction.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/suiSignAndExecuteTransaction.ts"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { SignedTransaction, SuiSignTransactionInput } from './suiSignTransaction.js';\n\n/** The latest API version of the signAndExecuteTransactionBlock API. */\nexport type SuiSignAndExecuteTransactionVersion = '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 SuiSignAndExecuteTransactionFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signAndExecuteTransaction': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignAndExecuteTransactionVersion;\n\t\tsignAndExecuteTransaction: SuiSignAndExecuteTransactionMethod;\n\t};\n};\n\nexport type SuiSignAndExecuteTransactionMethod = (\n\tinput: SuiSignAndExecuteTransactionInput,\n) => Promise<SuiSignAndExecuteTransactionOutput>;\n\n/** Input for signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionInput extends SuiSignTransactionInput {}\n\n/** Output of signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionOutput extends SignedTransaction {\n\tdigest: string;\n\t/** Transaction effects as base64 encoded bcs. */\n\teffects: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,8 +1,10 @@
1
- import type { ExecuteTransactionRequestType, SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from '@mysten/sui.js/client';
1
+ import type { ExecuteTransactionRequestType, SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from '@mysten/sui/client';
2
2
  import type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock.js';
3
3
  /** The latest API version of the signAndExecuteTransactionBlock API. */
4
4
  export type SuiSignAndExecuteTransactionBlockVersion = '1.0.0';
5
5
  /**
6
+ * @deprecated Use `sui:signAndExecuteTransaction` instead.
7
+ *
6
8
  * A Wallet Standard feature for signing a transaction, and submitting it to the
7
9
  * network. The wallet is expected to submit the transaction to the network via RPC,
8
10
  * and return the transaction response.
@@ -12,9 +14,11 @@ export type SuiSignAndExecuteTransactionBlockFeature = {
12
14
  'sui:signAndExecuteTransactionBlock': {
13
15
  /** Version of the feature API. */
14
16
  version: SuiSignAndExecuteTransactionBlockVersion;
17
+ /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
15
18
  signAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod;
16
19
  };
17
20
  };
21
+ /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
18
22
  export type SuiSignAndExecuteTransactionBlockMethod = (input: SuiSignAndExecuteTransactionBlockInput) => Promise<SuiSignAndExecuteTransactionBlockOutput>;
19
23
  /** Input for signing and sending transactions. */
20
24
  export interface SuiSignAndExecuteTransactionBlockInput extends SuiSignTransactionBlockInput {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/suiSignAndExecuteTransactionBlock.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExecuteTransactionRequestType,\n\tSuiTransactionBlockResponse,\n\tSuiTransactionBlockResponseOptions,\n} from '@mysten/sui.js/client';\n\nimport type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock.js';\n\n/** The latest API version of the signAndExecuteTransactionBlock API. */\nexport type SuiSignAndExecuteTransactionBlockVersion = '1.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 SuiSignAndExecuteTransactionBlockFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signAndExecuteTransactionBlock': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignAndExecuteTransactionBlockVersion;\n\t\tsignAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod;\n\t};\n};\n\nexport type SuiSignAndExecuteTransactionBlockMethod = (\n\tinput: SuiSignAndExecuteTransactionBlockInput,\n) => Promise<SuiSignAndExecuteTransactionBlockOutput>;\n\n/** Input for signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionBlockInput extends SuiSignTransactionBlockInput {\n\t/**\n\t * `WaitForEffectsCert` or `WaitForLocalExecution`, see details in `ExecuteTransactionRequestType`.\n\t * Defaults to `WaitForLocalExecution` if options.showEffects or options.showEvents is true\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?: SuiTransactionBlockResponseOptions;\n}\n\n/** Output of signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionBlockOutput extends SuiTransactionBlockResponse {}\n"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExecuteTransactionRequestType,\n\tSuiTransactionBlockResponse,\n\tSuiTransactionBlockResponseOptions,\n} from '@mysten/sui/client';\n\nimport type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock.js';\n\n/** The latest API version of the signAndExecuteTransactionBlock API. */\nexport type SuiSignAndExecuteTransactionBlockVersion = '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 SuiSignAndExecuteTransactionBlockFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signAndExecuteTransactionBlock': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignAndExecuteTransactionBlockVersion;\n\t\t/** @deprecated Use `sui:signAndExecuteTransaction` instead. */\n\t\tsignAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod;\n\t};\n};\n\n/** @deprecated Use `sui:signAndExecuteTransaction` instead. */\nexport type SuiSignAndExecuteTransactionBlockMethod = (\n\tinput: SuiSignAndExecuteTransactionBlockInput,\n) => Promise<SuiSignAndExecuteTransactionBlockOutput>;\n\n/** Input for signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionBlockInput extends SuiSignTransactionBlockInput {\n\t/**\n\t * `WaitForEffectsCert` or `WaitForLocalExecution`, see details in `ExecuteTransactionRequestType`.\n\t * Defaults to `WaitForLocalExecution` if options.showEffects or options.showEvents is true\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?: SuiTransactionBlockResponseOptions;\n}\n\n/** Output of signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionBlockOutput extends SuiTransactionBlockResponse {}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -33,6 +33,8 @@ export interface SuiSignMessageInput {
33
33
  * @deprecated Wallets can still implement this method for compatibility, but this has been replaced by the `sui:signPersonalMessage` feature
34
34
  */
35
35
  export interface SuiSignMessageOutput {
36
+ /** Base64 message bytes. */
36
37
  messageBytes: string;
38
+ /** Base64 encoded signature */
37
39
  signature: string;
38
40
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/suiSignMessage.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 * 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 SuiSignMessageVersion = '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 SuiSignMessageFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signMessage': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignMessageVersion;\n\t\tsignMessage: SuiSignMessageMethod;\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 SuiSignMessageMethod = (input: SuiSignMessageInput) => Promise<SuiSignMessageOutput>;\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 SuiSignMessageInput {\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 SuiSignMessageOutput {\n\tmessageBytes: string;\n\tsignature: string;\n}\n"],
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 * 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 SuiSignMessageVersion = '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 SuiSignMessageFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signMessage': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignMessageVersion;\n\t\tsignMessage: SuiSignMessageMethod;\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 SuiSignMessageMethod = (input: SuiSignMessageInput) => Promise<SuiSignMessageOutput>;\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 SuiSignMessageInput {\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 SuiSignMessageOutput {\n\t/** Base64 message bytes. */\n\tmessageBytes: string;\n\t/** Base64 encoded signature */\n\tsignature: string;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -23,6 +23,8 @@ export interface SuiSignPersonalMessageInput {
23
23
  export interface SuiSignPersonalMessageOutput extends SignedPersonalMessage {
24
24
  }
25
25
  export interface SignedPersonalMessage {
26
+ /** Base64 encoded message bytes */
26
27
  bytes: string;
28
+ /** Base64 encoded signature */
27
29
  signature: string;
28
30
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/suiSignPersonalMessage.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/** The latest API version of the signPersonalMessage API. */\nexport type SuiSignPersonalMessageVersion = '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 */\nexport type SuiSignPersonalMessageFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signPersonalMessage': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignPersonalMessageVersion;\n\t\tsignPersonalMessage: SuiSignPersonalMessageMethod;\n\t};\n};\n\nexport type SuiSignPersonalMessageMethod = (\n\tinput: SuiSignPersonalMessageInput,\n) => Promise<SuiSignPersonalMessageOutput>;\n\n/** Input for signing personal messages. */\nexport interface SuiSignPersonalMessageInput {\n\tmessage: Uint8Array;\n\taccount: WalletAccount;\n}\n\n/** Output of signing personal messages. */\nexport interface SuiSignPersonalMessageOutput extends SignedPersonalMessage {}\n\nexport interface SignedPersonalMessage {\n\tbytes: string;\n\tsignature: string;\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { WalletAccount } from '@wallet-standard/core';\n\n/** The latest API version of the signPersonalMessage API. */\nexport type SuiSignPersonalMessageVersion = '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 */\nexport type SuiSignPersonalMessageFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signPersonalMessage': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignPersonalMessageVersion;\n\t\tsignPersonalMessage: SuiSignPersonalMessageMethod;\n\t};\n};\n\nexport type SuiSignPersonalMessageMethod = (\n\tinput: SuiSignPersonalMessageInput,\n) => Promise<SuiSignPersonalMessageOutput>;\n\n/** Input for signing personal messages. */\nexport interface SuiSignPersonalMessageInput {\n\tmessage: Uint8Array;\n\taccount: WalletAccount;\n}\n\n/** Output of signing personal messages. */\nexport interface SuiSignPersonalMessageOutput 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
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,32 @@
1
+ import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
+ /** The latest API version of the signTransaction API. */
3
+ export type SuiSignTransactionVersion = '2.0.0';
4
+ /**
5
+ * A Wallet Standard feature for signing a transaction, and returning the
6
+ * serialized transaction and transaction signature.
7
+ */
8
+ export type SuiSignTransactionFeature = {
9
+ /** Namespace for the feature. */
10
+ 'sui:signTransaction': {
11
+ /** Version of the feature API. */
12
+ version: SuiSignTransactionVersion;
13
+ signTransaction: SuiSignTransactionMethod;
14
+ };
15
+ };
16
+ export type SuiSignTransactionMethod = (input: SuiSignTransactionInput) => Promise<SignedTransaction>;
17
+ /** Input for signing transactions. */
18
+ export interface SuiSignTransactionInput {
19
+ transaction: {
20
+ toJSON: () => Promise<string>;
21
+ };
22
+ account: WalletAccount;
23
+ chain: IdentifierString;
24
+ signal?: AbortSignal;
25
+ }
26
+ /** Output of signing transactions. */
27
+ export interface SignedTransaction {
28
+ /** Transaction as base64 encoded bcs. */
29
+ bytes: string;
30
+ /** Base64 encoded signature */
31
+ signature: string;
32
+ }
@@ -0,0 +1,17 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var suiSignTransaction_exports = {};
16
+ module.exports = __toCommonJS(suiSignTransaction_exports);
17
+ //# sourceMappingURL=suiSignTransaction.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/suiSignTransaction.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/** The latest API version of the signTransaction API. */\nexport type SuiSignTransactionVersion = '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 SuiSignTransactionFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signTransaction': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignTransactionVersion;\n\t\tsignTransaction: SuiSignTransactionMethod;\n\t};\n};\n\nexport type SuiSignTransactionMethod = (\n\tinput: SuiSignTransactionInput,\n) => Promise<SignedTransaction>;\n\n/** Input for signing transactions. */\nexport interface SuiSignTransactionInput {\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;",
6
+ "names": []
7
+ }
@@ -1,8 +1,10 @@
1
- import type { TransactionBlock } from '@mysten/sui.js/transactions';
1
+ import type { Transaction } from '@mysten/sui/transactions';
2
2
  import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
3
3
  /** The latest API version of the signTransactionBlock API. */
4
4
  export type SuiSignTransactionBlockVersion = '1.0.0';
5
5
  /**
6
+ * @deprecated Use `sui:signTransaction` instead.
7
+ *
6
8
  * A Wallet Standard feature for signing a transaction, and returning the
7
9
  * serialized transaction and transaction signature.
8
10
  */
@@ -11,13 +13,15 @@ export type SuiSignTransactionBlockFeature = {
11
13
  'sui:signTransactionBlock': {
12
14
  /** Version of the feature API. */
13
15
  version: SuiSignTransactionBlockVersion;
16
+ /** @deprecated Use `sui:signTransaction` instead. */
14
17
  signTransactionBlock: SuiSignTransactionBlockMethod;
15
18
  };
16
19
  };
20
+ /** @deprecated Use `sui:signTransaction` instead. */
17
21
  export type SuiSignTransactionBlockMethod = (input: SuiSignTransactionBlockInput) => Promise<SuiSignTransactionBlockOutput>;
18
22
  /** Input for signing transactions. */
19
23
  export interface SuiSignTransactionBlockInput {
20
- transactionBlock: TransactionBlock;
24
+ transactionBlock: Transaction;
21
25
  account: WalletAccount;
22
26
  chain: IdentifierString;
23
27
  }
@@ -25,6 +29,8 @@ export interface SuiSignTransactionBlockInput {
25
29
  export interface SuiSignTransactionBlockOutput extends SignedTransactionBlock {
26
30
  }
27
31
  export interface SignedTransactionBlock {
32
+ /** Transaction as base64 encoded bcs. */
28
33
  transactionBlockBytes: string;
34
+ /** Base64 encoded signature */
29
35
  signature: string;
30
36
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/suiSignTransactionBlock.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TransactionBlock } from '@mysten/sui.js/transactions';\nimport type { IdentifierString, WalletAccount } from '@wallet-standard/core';\n\n/** The latest API version of the signTransactionBlock API. */\nexport type SuiSignTransactionBlockVersion = '1.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 SuiSignTransactionBlockFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signTransactionBlock': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignTransactionBlockVersion;\n\t\tsignTransactionBlock: SuiSignTransactionBlockMethod;\n\t};\n};\n\nexport type SuiSignTransactionBlockMethod = (\n\tinput: SuiSignTransactionBlockInput,\n) => Promise<SuiSignTransactionBlockOutput>;\n\n/** Input for signing transactions. */\nexport interface SuiSignTransactionBlockInput {\n\ttransactionBlock: TransactionBlock;\n\taccount: WalletAccount;\n\tchain: IdentifierString;\n}\n\n/** Output of signing transactions. */\nexport interface SuiSignTransactionBlockOutput extends SignedTransactionBlock {}\n\nexport interface SignedTransactionBlock {\n\ttransactionBlockBytes: string;\n\tsignature: string;\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Transaction } from '@mysten/sui/transactions';\nimport type { IdentifierString, WalletAccount } from '@wallet-standard/core';\n\n/** The latest API version of the signTransactionBlock API. */\nexport type SuiSignTransactionBlockVersion = '1.0.0';\n\n/**\n * @deprecated Use `sui:signTransaction` instead.\n *\n * A Wallet Standard feature for signing a transaction, and returning the\n * serialized transaction and transaction signature.\n */\nexport type SuiSignTransactionBlockFeature = {\n\t/** Namespace for the feature. */\n\t'sui:signTransactionBlock': {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiSignTransactionBlockVersion;\n\t\t/** @deprecated Use `sui:signTransaction` instead. */\n\t\tsignTransactionBlock: SuiSignTransactionBlockMethod;\n\t};\n};\n\n/** @deprecated Use `sui:signTransaction` instead. */\nexport type SuiSignTransactionBlockMethod = (\n\tinput: SuiSignTransactionBlockInput,\n) => Promise<SuiSignTransactionBlockOutput>;\n\n/** Input for signing transactions. */\nexport interface SuiSignTransactionBlockInput {\n\ttransactionBlock: Transaction;\n\taccount: WalletAccount;\n\tchain: IdentifierString;\n}\n\n/** Output of signing transactions. */\nexport interface SuiSignTransactionBlockOutput extends SignedTransactionBlock {}\n\nexport interface SignedTransactionBlock {\n\t/** Transaction as base64 encoded bcs. */\n\ttransactionBlockBytes: string;\n\t/** Base64 encoded signature */\n\tsignature: string;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
1
  export * from '@wallet-standard/core';
2
- export type { Wallet } from './wallet.js';
2
+ export { type Wallet, signAndExecuteTransaction, signTransaction } from './wallet.js';
3
3
  export * from './features/index.js';
4
4
  export * from './detect.js';
5
5
  export * from './chains.js';
6
+ export * from './types.js';
package/dist/cjs/index.js CHANGED
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
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
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -14,9 +18,15 @@ var __copyProps = (to, from, except, desc) => {
14
18
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
20
  var src_exports = {};
21
+ __export(src_exports, {
22
+ signAndExecuteTransaction: () => import_wallet.signAndExecuteTransaction,
23
+ signTransaction: () => import_wallet.signTransaction
24
+ });
17
25
  module.exports = __toCommonJS(src_exports);
18
26
  __reExport(src_exports, require("@wallet-standard/core"), module.exports);
27
+ var import_wallet = require("./wallet.js");
19
28
  __reExport(src_exports, require("./features/index.js"), module.exports);
20
29
  __reExport(src_exports, require("./detect.js"), module.exports);
21
30
  __reExport(src_exports, require("./chains.js"), module.exports);
31
+ __reExport(src_exports, require("./types.js"), module.exports);
22
32
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport type { Wallet } from './wallet.js';\nexport * from './features/index.js';\nexport * from './detect.js';\nexport * from './chains.js';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAGA,wBAAc,kCAHd;AAMA,wBAAc,gCANd;AAOA,wBAAc,wBAPd;AAQA,wBAAc,wBARd;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport { type Wallet, signAndExecuteTransaction, signTransaction } from './wallet.js';\nexport * from './features/index.js';\nexport * from './detect.js';\nexport * from './chains.js';\nexport * from './types.js';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,kCAHd;AAKA,oBAAwE;AACxE,wBAAc,gCANd;AAOA,wBAAc,wBAPd;AAQA,wBAAc,wBARd;AASA,wBAAc,uBATd;",
6
6
  "names": []
7
7
  }