@mysten/wallet-standard 0.19.8 → 0.20.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 (137) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/dist/chains.d.mts +21 -0
  3. package/dist/chains.d.mts.map +1 -0
  4. package/dist/chains.mjs +26 -0
  5. package/dist/chains.mjs.map +1 -0
  6. package/dist/detect.d.mts +8 -0
  7. package/dist/detect.d.mts.map +1 -0
  8. package/dist/detect.mjs +11 -0
  9. package/dist/detect.mjs.map +1 -0
  10. package/dist/features/index.d.mts +25 -0
  11. package/dist/features/index.d.mts.map +1 -0
  12. package/dist/features/suiGetCapabilities.d.mts +19 -0
  13. package/dist/features/suiGetCapabilities.d.mts.map +1 -0
  14. package/dist/features/suiGetCapabilities.mjs +6 -0
  15. package/dist/features/suiGetCapabilities.mjs.map +1 -0
  16. package/dist/features/suiSignAndExecuteTransaction.d.mts +32 -0
  17. package/dist/features/suiSignAndExecuteTransaction.d.mts.map +1 -0
  18. package/dist/features/suiSignAndExecuteTransaction.mjs +7 -0
  19. package/dist/{esm/features/suiSignAndExecuteTransaction.js.map → features/suiSignAndExecuteTransaction.mjs.map} +1 -7
  20. package/dist/features/suiSignAndExecuteTransactionBlock.d.mts +40 -0
  21. package/dist/features/suiSignAndExecuteTransactionBlock.d.mts.map +1 -0
  22. package/dist/features/suiSignAndExecuteTransactionBlock.mjs +7 -0
  23. package/dist/features/suiSignAndExecuteTransactionBlock.mjs.map +1 -0
  24. package/dist/{esm/features/suiSignMessage.d.ts → features/suiSignMessage.d.mts} +25 -19
  25. package/dist/features/suiSignMessage.d.mts.map +1 -0
  26. package/dist/features/suiSignMessage.mjs +10 -0
  27. package/dist/features/suiSignMessage.mjs.map +1 -0
  28. package/dist/features/suiSignPersonalMessage.d.mts +37 -0
  29. package/dist/features/suiSignPersonalMessage.d.mts.map +1 -0
  30. package/dist/features/suiSignPersonalMessage.mjs +7 -0
  31. package/dist/features/suiSignPersonalMessage.mjs.map +1 -0
  32. package/dist/features/suiSignTransaction.d.mts +39 -0
  33. package/dist/features/suiSignTransaction.d.mts.map +1 -0
  34. package/dist/features/suiSignTransaction.mjs +7 -0
  35. package/dist/features/suiSignTransaction.mjs.map +1 -0
  36. package/dist/features/suiSignTransactionBlock.d.mts +42 -0
  37. package/dist/features/suiSignTransactionBlock.d.mts.map +1 -0
  38. package/dist/features/suiSignTransactionBlock.mjs +7 -0
  39. package/dist/features/suiSignTransactionBlock.mjs.map +1 -0
  40. package/dist/index.d.mts +14 -0
  41. package/dist/index.mjs +14 -0
  42. package/dist/types.d.mts +163 -0
  43. package/dist/types.d.mts.map +1 -0
  44. package/dist/wallet.d.mts +24 -0
  45. package/dist/wallet.d.mts.map +1 -0
  46. package/dist/wallet.mjs +45 -0
  47. package/dist/wallet.mjs.map +1 -0
  48. package/package.json +25 -17
  49. package/src/features/index.ts +0 -3
  50. package/src/features/suiSignAndExecuteTransactionBlock.ts +1 -1
  51. package/dist/cjs/chains.d.ts +0 -16
  52. package/dist/cjs/chains.js +0 -42
  53. package/dist/cjs/chains.js.map +0 -7
  54. package/dist/cjs/detect.d.ts +0 -3
  55. package/dist/cjs/detect.js +0 -31
  56. package/dist/cjs/detect.js.map +0 -7
  57. package/dist/cjs/features/index.d.ts +0 -28
  58. package/dist/cjs/features/index.js +0 -26
  59. package/dist/cjs/features/index.js.map +0 -7
  60. package/dist/cjs/features/suiGetCapabilities.d.ts +0 -15
  61. package/dist/cjs/features/suiGetCapabilities.js +0 -25
  62. package/dist/cjs/features/suiGetCapabilities.js.map +0 -7
  63. package/dist/cjs/features/suiReportTransactionEffects.d.ts +0 -26
  64. package/dist/cjs/features/suiReportTransactionEffects.js +0 -25
  65. package/dist/cjs/features/suiReportTransactionEffects.js.map +0 -7
  66. package/dist/cjs/features/suiSignAndExecuteTransaction.d.ts +0 -28
  67. package/dist/cjs/features/suiSignAndExecuteTransaction.js +0 -25
  68. package/dist/cjs/features/suiSignAndExecuteTransaction.js.map +0 -7
  69. package/dist/cjs/features/suiSignAndExecuteTransactionBlock.d.ts +0 -36
  70. package/dist/cjs/features/suiSignAndExecuteTransactionBlock.js +0 -25
  71. package/dist/cjs/features/suiSignAndExecuteTransactionBlock.js.map +0 -7
  72. package/dist/cjs/features/suiSignMessage.d.ts +0 -45
  73. package/dist/cjs/features/suiSignMessage.js +0 -25
  74. package/dist/cjs/features/suiSignMessage.js.map +0 -7
  75. package/dist/cjs/features/suiSignPersonalMessage.d.ts +0 -33
  76. package/dist/cjs/features/suiSignPersonalMessage.js +0 -25
  77. package/dist/cjs/features/suiSignPersonalMessage.js.map +0 -7
  78. package/dist/cjs/features/suiSignTransaction.d.ts +0 -34
  79. package/dist/cjs/features/suiSignTransaction.js +0 -25
  80. package/dist/cjs/features/suiSignTransaction.js.map +0 -7
  81. package/dist/cjs/features/suiSignTransactionBlock.d.ts +0 -38
  82. package/dist/cjs/features/suiSignTransactionBlock.js +0 -25
  83. package/dist/cjs/features/suiSignTransactionBlock.js.map +0 -7
  84. package/dist/cjs/index.d.ts +0 -6
  85. package/dist/cjs/index.js +0 -32
  86. package/dist/cjs/index.js.map +0 -7
  87. package/dist/cjs/package.json +0 -5
  88. package/dist/cjs/types.d.ts +0 -159
  89. package/dist/cjs/types.js +0 -17
  90. package/dist/cjs/types.js.map +0 -7
  91. package/dist/cjs/wallet.d.ts +0 -18
  92. package/dist/cjs/wallet.js +0 -80
  93. package/dist/cjs/wallet.js.map +0 -7
  94. package/dist/esm/chains.d.ts +0 -16
  95. package/dist/esm/chains.js +0 -22
  96. package/dist/esm/chains.js.map +0 -7
  97. package/dist/esm/detect.d.ts +0 -3
  98. package/dist/esm/detect.js +0 -11
  99. package/dist/esm/detect.js.map +0 -7
  100. package/dist/esm/features/index.d.ts +0 -28
  101. package/dist/esm/features/index.js +0 -9
  102. package/dist/esm/features/index.js.map +0 -7
  103. package/dist/esm/features/suiGetCapabilities.d.ts +0 -15
  104. package/dist/esm/features/suiGetCapabilities.js +0 -5
  105. package/dist/esm/features/suiGetCapabilities.js.map +0 -7
  106. package/dist/esm/features/suiReportTransactionEffects.d.ts +0 -26
  107. package/dist/esm/features/suiReportTransactionEffects.js +0 -5
  108. package/dist/esm/features/suiReportTransactionEffects.js.map +0 -7
  109. package/dist/esm/features/suiSignAndExecuteTransaction.d.ts +0 -28
  110. package/dist/esm/features/suiSignAndExecuteTransaction.js +0 -5
  111. package/dist/esm/features/suiSignAndExecuteTransactionBlock.d.ts +0 -36
  112. package/dist/esm/features/suiSignAndExecuteTransactionBlock.js +0 -5
  113. package/dist/esm/features/suiSignAndExecuteTransactionBlock.js.map +0 -7
  114. package/dist/esm/features/suiSignMessage.js +0 -5
  115. package/dist/esm/features/suiSignMessage.js.map +0 -7
  116. package/dist/esm/features/suiSignPersonalMessage.d.ts +0 -33
  117. package/dist/esm/features/suiSignPersonalMessage.js +0 -5
  118. package/dist/esm/features/suiSignPersonalMessage.js.map +0 -7
  119. package/dist/esm/features/suiSignTransaction.d.ts +0 -34
  120. package/dist/esm/features/suiSignTransaction.js +0 -5
  121. package/dist/esm/features/suiSignTransaction.js.map +0 -7
  122. package/dist/esm/features/suiSignTransactionBlock.d.ts +0 -38
  123. package/dist/esm/features/suiSignTransactionBlock.js +0 -5
  124. package/dist/esm/features/suiSignTransactionBlock.js.map +0 -7
  125. package/dist/esm/index.d.ts +0 -6
  126. package/dist/esm/index.js +0 -11
  127. package/dist/esm/index.js.map +0 -7
  128. package/dist/esm/package.json +0 -5
  129. package/dist/esm/types.d.ts +0 -159
  130. package/dist/esm/types.js +0 -1
  131. package/dist/esm/types.js.map +0 -7
  132. package/dist/esm/wallet.d.ts +0 -18
  133. package/dist/esm/wallet.js +0 -60
  134. package/dist/esm/wallet.js.map +0 -7
  135. package/dist/tsconfig.esm.tsbuildinfo +0 -1
  136. package/dist/tsconfig.tsbuildinfo +0 -1
  137. package/src/features/suiReportTransactionEffects.ts +0 -36
@@ -1,159 +0,0 @@
1
- /** Contains data related to the gas payment for a Transaction */
2
- export interface GasData {
3
- /** The budget set for this transaction */
4
- budget: string | number | null;
5
- /** The gas price used for this transaction */
6
- price: string | number | null;
7
- /** The owner of the gas coins used to fund the transactions, this is either the sender or the gas sponsor */
8
- owner: string | null;
9
- /** The list of SUI coins to fund the transaction */
10
- payment: {
11
- objectId: string;
12
- version: string;
13
- digest: string;
14
- }[] | null;
15
- }
16
- /**
17
- * Represent the serialized state of a partially built Transaction
18
- * This format is designed to support transactions that have not been fully build
19
- * allowing most properties to be omitted or set to null. It also supports
20
- * unresolved object references, unresolved pure values, and Transaction Intents.
21
- */
22
- export interface SerializedTransactionDataV2 {
23
- version: 2;
24
- /** The sender of the transaction */
25
- sender: string | null | undefined;
26
- /** The expiration of the transaction */
27
- expiration: {
28
- Epoch: number;
29
- } | {
30
- None: true;
31
- } | null | undefined;
32
- /** The gas data */
33
- gasData: GasData;
34
- /** The inputs to the transaction */
35
- inputs: CallArg[];
36
- /** The commands to execute */
37
- commands: Command[];
38
- /** Extra metadata for implementation specific use-cases */
39
- extensions?: {
40
- [key: string]: unknown;
41
- };
42
- /** The digest of the transaction, may be set when the transaction is fully resolved */
43
- digest: string | null | undefined;
44
- }
45
- /**
46
- * Represents an input to a Transaction, either as a fully resolved Object or Pure input
47
- * or as an unresolved partial reference which needs to be resolved before the transaction
48
- * can be serialized to bcs and executed.
49
- */
50
- export type CallArg = {
51
- Object: ObjectArg;
52
- } | {
53
- Pure: PureArg;
54
- } | {
55
- UnresolvedPure: UnresolvedPureArg;
56
- } | {
57
- UnresolvedObject: UnresolvedObjectArg;
58
- };
59
- export type ObjectArg = {
60
- ImmOrOwnedObject: {
61
- objectId: string;
62
- version: string | number;
63
- digest: string;
64
- };
65
- } | {
66
- SharedObject: {
67
- objectId: string;
68
- initialSharedVersion: string;
69
- mutable: boolean;
70
- };
71
- } | {
72
- Receiving: {
73
- objectId: string;
74
- version: string | number;
75
- digest: string;
76
- };
77
- };
78
- export interface PureArg {
79
- bytes: string;
80
- }
81
- /**
82
- * Represents an un-serialized pure value.
83
- * The correct bcs schema will need to be determined before this value can be serialized to bcs */
84
- export interface UnresolvedPureArg {
85
- value: unknown;
86
- }
87
- /**
88
- * Represents an unresolved object reference. This allows objects to be referenced by only their ID.
89
- * version and digest details may also be added to unresolved object references.
90
- * To fully resolve a reference, the correct ObjectArg type needs to be determined based on the type of object,
91
- * and how it used in the transaction (eg, is it used mutably if it's shared, and is it a receiving object if it's not shared)
92
- */
93
- export interface UnresolvedObjectArg {
94
- objectId: string;
95
- version?: string | null | undefined;
96
- digest?: string | null | undefined;
97
- initialSharedVersion?: string | null | undefined;
98
- mutable?: boolean | null | undefined;
99
- }
100
- export type Argument = {
101
- GasCoin: true;
102
- } | {
103
- Input: number;
104
- } | {
105
- Result: number;
106
- } | {
107
- NestedResult: [number, number];
108
- };
109
- export type Command = {
110
- MoveCall: {
111
- package: string;
112
- module: string;
113
- function: string;
114
- typeArguments: string[];
115
- arguments: Argument[];
116
- };
117
- } | {
118
- TransferObjects: {
119
- objects: Argument[];
120
- address: Argument;
121
- };
122
- } | {
123
- SplitCoins: {
124
- coin: Argument;
125
- amounts: Argument[];
126
- };
127
- } | {
128
- MergeCoins: {
129
- destination: Argument;
130
- sources: Argument[];
131
- };
132
- } | {
133
- Publish: {
134
- modules: string[];
135
- dependencies: string[];
136
- };
137
- } | {
138
- MakeMoveVec: {
139
- type: string | null;
140
- elements: Argument[];
141
- };
142
- } | {
143
- Upgrade: {
144
- modules: string[];
145
- dependencies: string[];
146
- package: string;
147
- ticket: Argument;
148
- };
149
- } | {
150
- $Intent: {
151
- name: string;
152
- inputs: {
153
- [key: string]: Argument | Argument[];
154
- };
155
- data: {
156
- [key: string]: unknown;
157
- };
158
- };
159
- };
package/dist/cjs/types.js DELETED
@@ -1,17 +0,0 @@
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 types_exports = {};
16
- module.exports = __toCommonJS(types_exports);
17
- //# sourceMappingURL=types.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/types.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/** Contains data related to the gas payment for a Transaction */\nexport interface GasData {\n\t/** The budget set for this transaction */\n\tbudget: string | number | null;\n\t/** The gas price used for this transaction */\n\tprice: string | number | null;\n\t/** The owner of the gas coins used to fund the transactions, this is either the sender or the gas sponsor */\n\towner: string | null;\n\t/** The list of SUI coins to fund the transaction */\n\tpayment: { objectId: string; version: string; digest: string }[] | null;\n}\n\n/**\n * Represent the serialized state of a partially built Transaction\n * This format is designed to support transactions that have not been fully build\n * allowing most properties to be omitted or set to null. It also supports\n * unresolved object references, unresolved pure values, and Transaction Intents.\n */\nexport interface SerializedTransactionDataV2 {\n\tversion: 2;\n\t/** The sender of the transaction */\n\tsender: string | null | undefined;\n\t/** The expiration of the transaction */\n\texpiration: { Epoch: number } | { None: true } | null | undefined;\n\t/** The gas data */\n\tgasData: GasData;\n\t/** The inputs to the transaction */\n\tinputs: CallArg[];\n\t/** The commands to execute */\n\tcommands: Command[];\n\t/** Extra metadata for implementation specific use-cases */\n\textensions?: { [key: string]: unknown };\n\t/** The digest of the transaction, may be set when the transaction is fully resolved */\n\tdigest: string | null | undefined;\n}\n\n/**\n * Represents an input to a Transaction, either as a fully resolved Object or Pure input\n * or as an unresolved partial reference which needs to be resolved before the transaction\n * can be serialized to bcs and executed.\n */\nexport type CallArg =\n\t| {\n\t\t\tObject: ObjectArg;\n\t }\n\t| {\n\t\t\tPure: PureArg;\n\t }\n\t| {\n\t\t\tUnresolvedPure: UnresolvedPureArg;\n\t }\n\t| {\n\t\t\tUnresolvedObject: UnresolvedObjectArg;\n\t };\n\nexport type ObjectArg =\n\t| {\n\t\t\tImmOrOwnedObject: {\n\t\t\t\tobjectId: string;\n\t\t\t\tversion: string | number;\n\t\t\t\tdigest: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tSharedObject: {\n\t\t\t\tobjectId: string;\n\t\t\t\tinitialSharedVersion: string;\n\t\t\t\tmutable: boolean;\n\t\t\t};\n\t }\n\t| {\n\t\t\tReceiving: {\n\t\t\t\tobjectId: string;\n\t\t\t\tversion: string | number;\n\t\t\t\tdigest: string;\n\t\t\t};\n\t };\n\nexport interface PureArg {\n\tbytes: string;\n}\n\n/**\n * Represents an un-serialized pure value.\n * The correct bcs schema will need to be determined before this value can be serialized to bcs */\nexport interface UnresolvedPureArg {\n\tvalue: unknown;\n}\n\n/**\n * Represents an unresolved object reference. This allows objects to be referenced by only their ID.\n * version and digest details may also be added to unresolved object references.\n * To fully resolve a reference, the correct ObjectArg type needs to be determined based on the type of object,\n * and how it used in the transaction (eg, is it used mutably if it's shared, and is it a receiving object if it's not shared)\n */\nexport interface UnresolvedObjectArg {\n\tobjectId: string;\n\tversion?: string | null | undefined;\n\tdigest?: string | null | undefined;\n\tinitialSharedVersion?: string | null | undefined;\n\tmutable?: boolean | null | undefined;\n}\n\nexport type Argument =\n\t| {\n\t\t\tGasCoin: true;\n\t }\n\t| {\n\t\t\tInput: number;\n\t }\n\t| {\n\t\t\tResult: number;\n\t }\n\t| {\n\t\t\tNestedResult: [number, number];\n\t };\n\nexport type Command =\n\t| {\n\t\t\tMoveCall: {\n\t\t\t\tpackage: string;\n\t\t\t\tmodule: string;\n\t\t\t\tfunction: string;\n\t\t\t\ttypeArguments: string[];\n\t\t\t\targuments: Argument[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tTransferObjects: {\n\t\t\t\tobjects: Argument[];\n\t\t\t\taddress: Argument;\n\t\t\t};\n\t }\n\t| {\n\t\t\tSplitCoins: {\n\t\t\t\tcoin: Argument;\n\t\t\t\tamounts: Argument[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tMergeCoins: {\n\t\t\t\tdestination: Argument;\n\t\t\t\tsources: Argument[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tPublish: {\n\t\t\t\tmodules: string[];\n\t\t\t\tdependencies: string[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tMakeMoveVec: {\n\t\t\t\ttype: string | null;\n\t\t\t\telements: Argument[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tUpgrade: {\n\t\t\t\tmodules: string[];\n\t\t\t\tdependencies: string[];\n\t\t\t\tpackage: string;\n\t\t\t\tticket: Argument;\n\t\t\t};\n\t }\n\t| {\n\t\t\t$Intent: {\n\t\t\t\tname: string;\n\t\t\t\tinputs: { [key: string]: Argument | Argument[] };\n\t\t\t\tdata: { [key: string]: unknown };\n\t\t\t};\n\t };\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,18 +0,0 @@
1
- import type { WalletWithFeatures } from '@wallet-standard/core';
2
- import type { SuiSignAndExecuteTransactionInput, SuiSignTransactionInput, SuiWalletFeatures } from './features/index.js';
3
- declare module '@wallet-standard/core' {
4
- interface Wallet {
5
- /**
6
- * Unique identifier of the Wallet.
7
- *
8
- * If not provided, the wallet name will be used as the identifier.
9
- */
10
- readonly id?: string;
11
- }
12
- interface StandardConnectOutput {
13
- supportedIntents?: string[];
14
- }
15
- }
16
- export type { Wallet } from '@wallet-standard/core';
17
- export declare function signAndExecuteTransaction(wallet: WalletWithFeatures<Partial<SuiWalletFeatures>>, input: SuiSignAndExecuteTransactionInput): Promise<import("./features/suiSignAndExecuteTransaction.js").SuiSignAndExecuteTransactionOutput>;
18
- export declare function signTransaction(wallet: WalletWithFeatures<Partial<SuiWalletFeatures>>, input: SuiSignTransactionInput): Promise<import("./features/suiSignTransaction.js").SignedTransaction>;
@@ -1,80 +0,0 @@
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 wallet_exports = {};
20
- __export(wallet_exports, {
21
- signAndExecuteTransaction: () => signAndExecuteTransaction,
22
- signTransaction: () => signTransaction
23
- });
24
- module.exports = __toCommonJS(wallet_exports);
25
- var import_bcs = require("@mysten/sui/bcs");
26
- var import_transactions = require("@mysten/sui/transactions");
27
- var import_utils = require("@mysten/sui/utils");
28
- async function signAndExecuteTransaction(wallet, input) {
29
- if (wallet.features["sui:signAndExecuteTransaction"]) {
30
- return wallet.features["sui:signAndExecuteTransaction"].signAndExecuteTransaction(input);
31
- }
32
- if (!wallet.features["sui:signAndExecuteTransactionBlock"]) {
33
- throw new Error(
34
- `Provided wallet (${wallet.name}) does not support the signAndExecuteTransaction feature.`
35
- );
36
- }
37
- const { signAndExecuteTransactionBlock } = wallet.features["sui:signAndExecuteTransactionBlock"];
38
- const transactionBlock = import_transactions.Transaction.from(await input.transaction.toJSON());
39
- const { digest, rawEffects, rawTransaction } = await signAndExecuteTransactionBlock({
40
- account: input.account,
41
- chain: input.chain,
42
- transactionBlock,
43
- options: {
44
- showRawEffects: true,
45
- showRawInput: true
46
- }
47
- });
48
- const [
49
- {
50
- txSignatures: [signature],
51
- intentMessage: { value: bcsTransaction }
52
- }
53
- ] = import_bcs.bcs.SenderSignedData.parse((0, import_utils.fromBase64)(rawTransaction));
54
- const bytes = import_bcs.bcs.TransactionData.serialize(bcsTransaction).toBase64();
55
- return {
56
- digest,
57
- signature,
58
- bytes,
59
- effects: (0, import_utils.toBase64)(new Uint8Array(rawEffects))
60
- };
61
- }
62
- async function signTransaction(wallet, input) {
63
- if (wallet.features["sui:signTransaction"]) {
64
- return wallet.features["sui:signTransaction"].signTransaction(input);
65
- }
66
- if (!wallet.features["sui:signTransactionBlock"]) {
67
- throw new Error(
68
- `Provided wallet (${wallet.name}) does not support the signTransaction feature.`
69
- );
70
- }
71
- const { signTransactionBlock } = wallet.features["sui:signTransactionBlock"];
72
- const transaction = import_transactions.Transaction.from(await input.transaction.toJSON());
73
- const { transactionBlockBytes, signature } = await signTransactionBlock({
74
- transactionBlock: transaction,
75
- account: input.account,
76
- chain: input.chain
77
- });
78
- return { bytes: transactionBlockBytes, signature };
79
- }
80
- //# sourceMappingURL=wallet.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/wallet.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs } from '@mysten/sui/bcs';\nimport { Transaction } from '@mysten/sui/transactions';\nimport { fromBase64, toBase64 } from '@mysten/sui/utils';\nimport type { WalletWithFeatures } from '@wallet-standard/core';\n\nimport type {\n\tSuiSignAndExecuteTransactionInput,\n\tSuiSignTransactionInput,\n\tSuiWalletFeatures,\n} from './features/index.js';\n\ndeclare module '@wallet-standard/core' {\n\texport interface Wallet {\n\t\t/**\n\t\t * Unique identifier of the Wallet.\n\t\t *\n\t\t * If not provided, the wallet name will be used as the identifier.\n\t\t */\n\t\treadonly id?: string;\n\t}\n\n\texport interface StandardConnectOutput {\n\t\tsupportedIntents?: string[];\n\t}\n}\n\nexport type { Wallet } from '@wallet-standard/core';\n\nexport async function signAndExecuteTransaction(\n\twallet: WalletWithFeatures<Partial<SuiWalletFeatures>>,\n\tinput: SuiSignAndExecuteTransactionInput,\n) {\n\tif (wallet.features['sui:signAndExecuteTransaction']) {\n\t\treturn wallet.features['sui:signAndExecuteTransaction'].signAndExecuteTransaction(input);\n\t}\n\n\tif (!wallet.features['sui:signAndExecuteTransactionBlock']) {\n\t\tthrow new Error(\n\t\t\t`Provided wallet (${wallet.name}) does not support the signAndExecuteTransaction feature.`,\n\t\t);\n\t}\n\n\tconst { signAndExecuteTransactionBlock } = wallet.features['sui:signAndExecuteTransactionBlock'];\n\n\tconst transactionBlock = Transaction.from(await input.transaction.toJSON());\n\tconst { digest, rawEffects, rawTransaction } = await signAndExecuteTransactionBlock({\n\t\taccount: input.account,\n\t\tchain: input.chain,\n\t\ttransactionBlock,\n\t\toptions: {\n\t\t\tshowRawEffects: true,\n\t\t\tshowRawInput: true,\n\t\t},\n\t});\n\n\tconst [\n\t\t{\n\t\t\ttxSignatures: [signature],\n\t\t\tintentMessage: { value: bcsTransaction },\n\t\t},\n\t] = bcs.SenderSignedData.parse(fromBase64(rawTransaction!));\n\n\tconst bytes = bcs.TransactionData.serialize(bcsTransaction).toBase64();\n\n\treturn {\n\t\tdigest,\n\t\tsignature,\n\t\tbytes,\n\t\teffects: toBase64(new Uint8Array(rawEffects!)),\n\t};\n}\n\nexport async function signTransaction(\n\twallet: WalletWithFeatures<Partial<SuiWalletFeatures>>,\n\tinput: SuiSignTransactionInput,\n) {\n\tif (wallet.features['sui:signTransaction']) {\n\t\treturn wallet.features['sui:signTransaction'].signTransaction(input);\n\t}\n\n\tif (!wallet.features['sui:signTransactionBlock']) {\n\t\tthrow new Error(\n\t\t\t`Provided wallet (${wallet.name}) does not support the signTransaction feature.`,\n\t\t);\n\t}\n\n\tconst { signTransactionBlock } = wallet.features['sui:signTransactionBlock'];\n\n\tconst transaction = Transaction.from(await input.transaction.toJSON());\n\tconst { transactionBlockBytes, signature } = await signTransactionBlock({\n\t\ttransactionBlock: transaction,\n\t\taccount: input.account,\n\t\tchain: input.chain,\n\t});\n\n\treturn { bytes: transactionBlockBytes, signature };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAoB;AACpB,0BAA4B;AAC5B,mBAAqC;AA0BrC,eAAsB,0BACrB,QACA,OACC;AACD,MAAI,OAAO,SAAS,+BAA+B,GAAG;AACrD,WAAO,OAAO,SAAS,+BAA+B,EAAE,0BAA0B,KAAK;AAAA,EACxF;AAEA,MAAI,CAAC,OAAO,SAAS,oCAAoC,GAAG;AAC3D,UAAM,IAAI;AAAA,MACT,oBAAoB,OAAO,IAAI;AAAA,IAChC;AAAA,EACD;AAEA,QAAM,EAAE,+BAA+B,IAAI,OAAO,SAAS,oCAAoC;AAE/F,QAAM,mBAAmB,gCAAY,KAAK,MAAM,MAAM,YAAY,OAAO,CAAC;AAC1E,QAAM,EAAE,QAAQ,YAAY,eAAe,IAAI,MAAM,+BAA+B;AAAA,IACnF,SAAS,MAAM;AAAA,IACf,OAAO,MAAM;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACR,gBAAgB;AAAA,MAChB,cAAc;AAAA,IACf;AAAA,EACD,CAAC;AAED,QAAM;AAAA,IACL;AAAA,MACC,cAAc,CAAC,SAAS;AAAA,MACxB,eAAe,EAAE,OAAO,eAAe;AAAA,IACxC;AAAA,EACD,IAAI,eAAI,iBAAiB,UAAM,yBAAW,cAAe,CAAC;AAE1D,QAAM,QAAQ,eAAI,gBAAgB,UAAU,cAAc,EAAE,SAAS;AAErE,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAS,uBAAS,IAAI,WAAW,UAAW,CAAC;AAAA,EAC9C;AACD;AAEA,eAAsB,gBACrB,QACA,OACC;AACD,MAAI,OAAO,SAAS,qBAAqB,GAAG;AAC3C,WAAO,OAAO,SAAS,qBAAqB,EAAE,gBAAgB,KAAK;AAAA,EACpE;AAEA,MAAI,CAAC,OAAO,SAAS,0BAA0B,GAAG;AACjD,UAAM,IAAI;AAAA,MACT,oBAAoB,OAAO,IAAI;AAAA,IAChC;AAAA,EACD;AAEA,QAAM,EAAE,qBAAqB,IAAI,OAAO,SAAS,0BAA0B;AAE3E,QAAM,cAAc,gCAAY,KAAK,MAAM,MAAM,YAAY,OAAO,CAAC;AACrE,QAAM,EAAE,uBAAuB,UAAU,IAAI,MAAM,qBAAqB;AAAA,IACvE,kBAAkB;AAAA,IAClB,SAAS,MAAM;AAAA,IACf,OAAO,MAAM;AAAA,EACd,CAAC;AAED,SAAO,EAAE,OAAO,uBAAuB,UAAU;AAClD;",
6
- "names": []
7
- }
@@ -1,16 +0,0 @@
1
- import type { IdentifierString } from '@wallet-standard/core';
2
- /** Sui Devnet */
3
- export declare const SUI_DEVNET_CHAIN = "sui:devnet";
4
- /** Sui Testnet */
5
- export declare const SUI_TESTNET_CHAIN = "sui:testnet";
6
- /** Sui Localnet */
7
- export declare const SUI_LOCALNET_CHAIN = "sui:localnet";
8
- /** Sui Mainnet */
9
- export declare const SUI_MAINNET_CHAIN = "sui:mainnet";
10
- export declare const SUI_CHAINS: readonly ["sui:devnet", "sui:testnet", "sui:localnet", "sui:mainnet"];
11
- export type SuiChain = (typeof SUI_CHAINS)[number];
12
- /**
13
- * Utility that returns whether or not a chain identifier is a valid Sui chain.
14
- * @param chain a chain identifier in the form of `${string}:{$string}`
15
- */
16
- export declare function isSuiChain(chain: IdentifierString): chain is SuiChain;
@@ -1,22 +0,0 @@
1
- const SUI_DEVNET_CHAIN = "sui:devnet";
2
- const SUI_TESTNET_CHAIN = "sui:testnet";
3
- const SUI_LOCALNET_CHAIN = "sui:localnet";
4
- const SUI_MAINNET_CHAIN = "sui:mainnet";
5
- const SUI_CHAINS = [
6
- SUI_DEVNET_CHAIN,
7
- SUI_TESTNET_CHAIN,
8
- SUI_LOCALNET_CHAIN,
9
- SUI_MAINNET_CHAIN
10
- ];
11
- function isSuiChain(chain) {
12
- return SUI_CHAINS.includes(chain);
13
- }
14
- export {
15
- SUI_CHAINS,
16
- SUI_DEVNET_CHAIN,
17
- SUI_LOCALNET_CHAIN,
18
- SUI_MAINNET_CHAIN,
19
- SUI_TESTNET_CHAIN,
20
- isSuiChain
21
- };
22
- //# sourceMappingURL=chains.js.map
@@ -1,7 +0,0 @@
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/** Sui Devnet */\nexport const SUI_DEVNET_CHAIN = 'sui:devnet';\n\n/** Sui Testnet */\nexport const SUI_TESTNET_CHAIN = 'sui:testnet';\n\n/** Sui Localnet */\nexport const SUI_LOCALNET_CHAIN = 'sui:localnet';\n\n/** Sui Mainnet */\nexport const SUI_MAINNET_CHAIN = 'sui:mainnet';\n\nexport const SUI_CHAINS = [\n\tSUI_DEVNET_CHAIN,\n\tSUI_TESTNET_CHAIN,\n\tSUI_LOCALNET_CHAIN,\n\tSUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain = (typeof SUI_CHAINS)[number];\n\n/**\n * Utility that returns whether or not a chain identifier is a valid Sui chain.\n * @param chain a chain identifier in the form of `${string}:{$string}`\n */\nexport function isSuiChain(chain: IdentifierString): chain is SuiChain {\n\treturn SUI_CHAINS.includes(chain as SuiChain);\n}\n"],
5
- "mappings": "AAMO,MAAM,mBAAmB;AAGzB,MAAM,oBAAoB;AAG1B,MAAM,qBAAqB;AAG3B,MAAM,oBAAoB;AAE1B,MAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAQO,SAAS,WAAW,OAA4C;AACtE,SAAO,WAAW,SAAS,KAAiB;AAC7C;",
6
- "names": []
7
- }
@@ -1,3 +0,0 @@
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>;
@@ -1,11 +0,0 @@
1
- import { StandardConnect, StandardEvents } from "@wallet-standard/core";
2
- const REQUIRED_FEATURES = [StandardConnect, StandardEvents];
3
- function isWalletWithRequiredFeatureSet(wallet, additionalFeatures = []) {
4
- return [...REQUIRED_FEATURES, ...additionalFeatures].every(
5
- (feature) => feature in wallet.features
6
- );
7
- }
8
- export {
9
- isWalletWithRequiredFeatureSet
10
- };
11
- //# sourceMappingURL=detect.js.map
@@ -1,7 +0,0 @@
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 Sui 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": "AAGA,SAAS,iBAAiB,sBAAsB;AAOhD,MAAM,oBAAyD,CAAC,iBAAiB,cAAc;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
- }
@@ -1,28 +0,0 @@
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';
4
- import type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock.js';
5
- import type { SuiSignMessageFeature } from './suiSignMessage.js';
6
- import type { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage.js';
7
- import type { SuiSignTransactionFeature } from './suiSignTransaction.js';
8
- import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock.js';
9
- import type { SuiGetCapabilitiesFeature } from './suiGetCapabilities.js';
10
- /**
11
- * Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.
12
- */
13
- export type SuiFeatures = Partial<SuiSignTransactionBlockFeature> & Partial<SuiSignAndExecuteTransactionBlockFeature> & SuiSignPersonalMessageFeature & SuiSignAndExecuteTransactionFeature & SuiSignTransactionFeature & Partial<SuiSignMessageFeature> & Partial<SuiReportTransactionEffectsFeature> & Partial<SuiGetCapabilitiesFeature>;
14
- export type SuiWalletFeatures = StandardConnectFeature & StandardEventsFeature & SuiFeatures & Partial<StandardDisconnectFeature>;
15
- export type WalletWithSuiFeatures = WalletWithFeatures<SuiWalletFeatures>;
16
- /**
17
- * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.
18
- */
19
- export type WalletWithRequiredFeatures = WalletWithFeatures<MinimallyRequiredFeatures & Partial<SuiFeatures> & Partial<StandardDisconnectFeature> & IdentifierRecord<unknown>>;
20
- export type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;
21
- export * from './suiSignMessage.js';
22
- export * from './suiSignTransactionBlock.js';
23
- export * from './suiSignTransaction.js';
24
- export * from './suiSignAndExecuteTransactionBlock.js';
25
- export * from './suiSignAndExecuteTransaction.js';
26
- export * from './suiSignPersonalMessage.js';
27
- export * from './suiReportTransactionEffects.js';
28
- export * from './suiGetCapabilities.js';
@@ -1,9 +0,0 @@
1
- export * from "./suiSignMessage.js";
2
- export * from "./suiSignTransactionBlock.js";
3
- export * from "./suiSignTransaction.js";
4
- export * from "./suiSignAndExecuteTransactionBlock.js";
5
- export * from "./suiSignAndExecuteTransaction.js";
6
- export * from "./suiSignPersonalMessage.js";
7
- export * from "./suiReportTransactionEffects.js";
8
- export * from "./suiGetCapabilities.js";
9
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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 { 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';\nimport type { SuiGetCapabilitiesFeature } from './suiGetCapabilities.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\tPartial<SuiGetCapabilitiesFeature>;\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';\nexport * from './suiGetCapabilities.js';\n"],
5
- "mappings": "AAqDA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
- "names": []
7
- }
@@ -1,15 +0,0 @@
1
- export declare const SuiGetCapabilities = "sui:getCapabilities";
2
- /** The latest API version of the getCapabilities API. */
3
- export type SuiGetCapabilitiesVersion = '1.0.0';
4
- /**
5
- * A Wallet Standard feature for reporting intents supported by the wallet.
6
- */
7
- export type SuiGetCapabilitiesFeature = {
8
- [SuiGetCapabilities]: {
9
- version: SuiGetCapabilitiesVersion;
10
- getCapabilities: SuiGetCapabilitiesMethod;
11
- };
12
- };
13
- export type SuiGetCapabilitiesMethod = () => Promise<{
14
- supportedIntents?: string[];
15
- }>;
@@ -1,5 +0,0 @@
1
- const SuiGetCapabilities = "sui:getCapabilities";
2
- export {
3
- SuiGetCapabilities
4
- };
5
- //# sourceMappingURL=suiGetCapabilities.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/suiGetCapabilities.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const SuiGetCapabilities = 'sui:getCapabilities';\n\n/** The latest API version of the getCapabilities API. */\nexport type SuiGetCapabilitiesVersion = '1.0.0';\n\n/**\n * A Wallet Standard feature for reporting intents supported by the wallet.\n */\nexport type SuiGetCapabilitiesFeature = {\n\t[SuiGetCapabilities]: {\n\t\tversion: SuiGetCapabilitiesVersion;\n\t\tgetCapabilities: SuiGetCapabilitiesMethod;\n\t};\n};\n\nexport type SuiGetCapabilitiesMethod = () => Promise<{\n\tsupportedIntents?: string[];\n}>;\n"],
5
- "mappings": "AAGO,MAAM,qBAAqB;",
6
- "names": []
7
- }
@@ -1,26 +0,0 @@
1
- import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
2
- /** Name of the feature. */
3
- export declare const SuiReportTransactionEffects = "sui:reportTransactionEffects";
4
- /** The latest API version of the reportTransactionEffects API. */
5
- export type SuiReportTransactionEffectsVersion = '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 SuiReportTransactionEffectsFeature = {
12
- /** Namespace for the feature. */
13
- [SuiReportTransactionEffects]: {
14
- /** Version of the feature API. */
15
- version: SuiReportTransactionEffectsVersion;
16
- reportTransactionEffects: SuiReportTransactionEffectsMethod;
17
- };
18
- };
19
- export type SuiReportTransactionEffectsMethod = (input: SuiReportTransactionEffectsInput) => Promise<void>;
20
- /** Input for signing transactions. */
21
- export interface SuiReportTransactionEffectsInput {
22
- account: WalletAccount;
23
- chain: IdentifierString;
24
- /** Transaction effects as base64 encoded bcs. */
25
- effects: string;
26
- }
@@ -1,5 +0,0 @@
1
- const SuiReportTransactionEffects = "sui:reportTransactionEffects";
2
- export {
3
- SuiReportTransactionEffects
4
- };
5
- //# sourceMappingURL=suiReportTransactionEffects.js.map
@@ -1,7 +0,0 @@
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/** Name of the feature. */\nexport const SuiReportTransactionEffects = 'sui:reportTransactionEffects';\n\n/** The latest API version of the reportTransactionEffects API. */\nexport type SuiReportTransactionEffectsVersion = '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 SuiReportTransactionEffectsFeature = {\n\t/** Namespace for the feature. */\n\t[SuiReportTransactionEffects]: {\n\t\t/** Version of the feature API. */\n\t\tversion: SuiReportTransactionEffectsVersion;\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": "AAMO,MAAM,8BAA8B;",
6
- "names": []
7
- }
@@ -1,28 +0,0 @@
1
- import type { SignedTransaction, SuiSignTransactionInput } from './suiSignTransaction.js';
2
- /** Name of the feature. */
3
- export declare const SuiSignAndExecuteTransaction = "sui:signAndExecuteTransaction";
4
- /** The latest API version of the signAndExecuteTransactionBlock API. */
5
- export type SuiSignAndExecuteTransactionVersion = '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 SuiSignAndExecuteTransactionFeature = {
12
- /** Namespace for the feature. */
13
- [SuiSignAndExecuteTransaction]: {
14
- /** Version of the feature API. */
15
- version: SuiSignAndExecuteTransactionVersion;
16
- signAndExecuteTransaction: SuiSignAndExecuteTransactionMethod;
17
- };
18
- };
19
- export type SuiSignAndExecuteTransactionMethod = (input: SuiSignAndExecuteTransactionInput) => Promise<SuiSignAndExecuteTransactionOutput>;
20
- /** Input for signing and sending transactions. */
21
- export interface SuiSignAndExecuteTransactionInput extends SuiSignTransactionInput {
22
- }
23
- /** Output of signing and sending transactions. */
24
- export interface SuiSignAndExecuteTransactionOutput extends SignedTransaction {
25
- digest: string;
26
- /** Transaction effects as base64 encoded bcs. */
27
- effects: string;
28
- }
@@ -1,5 +0,0 @@
1
- const SuiSignAndExecuteTransaction = "sui:signAndExecuteTransaction";
2
- export {
3
- SuiSignAndExecuteTransaction
4
- };
5
- //# sourceMappingURL=suiSignAndExecuteTransaction.js.map
@@ -1,36 +0,0 @@
1
- import type { ExecuteTransactionRequestType, SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from '@mysten/sui/client';
2
- import type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock.js';
3
- /** Name of the feature. */
4
- export declare const SuiSignAndExecuteTransactionBlock = "sui:signAndExecuteTransactionBlock";
5
- /** The latest API version of the signAndExecuteTransactionBlock API. */
6
- export type SuiSignAndExecuteTransactionBlockVersion = '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 SuiSignAndExecuteTransactionBlockFeature = {
15
- /** Namespace for the feature. */
16
- [SuiSignAndExecuteTransactionBlock]: {
17
- /** Version of the feature API. */
18
- version: SuiSignAndExecuteTransactionBlockVersion;
19
- /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
20
- signAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod;
21
- };
22
- };
23
- /** @deprecated Use `sui:signAndExecuteTransaction` instead. */
24
- export type SuiSignAndExecuteTransactionBlockMethod = (input: SuiSignAndExecuteTransactionBlockInput) => Promise<SuiSignAndExecuteTransactionBlockOutput>;
25
- /** Input for signing and sending transactions. */
26
- export interface SuiSignAndExecuteTransactionBlockInput extends SuiSignTransactionBlockInput {
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?: SuiTransactionBlockResponseOptions;
33
- }
34
- /** Output of signing and sending transactions. */
35
- export interface SuiSignAndExecuteTransactionBlockOutput extends SuiTransactionBlockResponse {
36
- }
@@ -1,5 +0,0 @@
1
- const SuiSignAndExecuteTransactionBlock = "sui:signAndExecuteTransactionBlock";
2
- export {
3
- SuiSignAndExecuteTransactionBlock
4
- };
5
- //# sourceMappingURL=suiSignAndExecuteTransactionBlock.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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/client';\n\nimport type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock.js';\n\n/** Name of the feature. */\nexport const SuiSignAndExecuteTransactionBlock = 'sui:signAndExecuteTransactionBlock';\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[SuiSignAndExecuteTransactionBlock]: {\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 * @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?: SuiTransactionBlockResponseOptions;\n}\n\n/** Output of signing and sending transactions. */\nexport interface SuiSignAndExecuteTransactionBlockOutput extends SuiTransactionBlockResponse {}\n"],
5
- "mappings": "AAYO,MAAM,oCAAoC;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- const SuiSignMessage = "sui:signMessage";
2
- export {
3
- SuiSignMessage
4
- };
5
- //# sourceMappingURL=suiSignMessage.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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 * 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 SuiSignMessage = '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 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[SuiSignMessage]: {\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
- "mappings": "AASO,MAAM,iBAAiB;",
6
- "names": []
7
- }