@mysten/sui 1.10.0 → 1.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 (187) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/bcs/bcs.js +14 -14
  3. package/dist/cjs/bcs/bcs.js.map +2 -2
  4. package/dist/cjs/client/client.js +6 -6
  5. package/dist/cjs/client/client.js.map +2 -2
  6. package/dist/cjs/client/types/generated.d.ts +1 -2
  7. package/dist/cjs/client/types/generated.js.map +1 -1
  8. package/dist/cjs/cryptography/keypair.js +2 -2
  9. package/dist/cjs/cryptography/keypair.js.map +2 -2
  10. package/dist/cjs/cryptography/mnemonics.js +1 -1
  11. package/dist/cjs/cryptography/mnemonics.js.map +1 -1
  12. package/dist/cjs/cryptography/publickey.js +2 -2
  13. package/dist/cjs/cryptography/publickey.js.map +2 -2
  14. package/dist/cjs/cryptography/signature.js +2 -2
  15. package/dist/cjs/cryptography/signature.js.map +2 -2
  16. package/dist/cjs/graphql/generated/2024.1/tada-env.d.js.map +1 -1
  17. package/dist/cjs/graphql/generated/2024.4/tada-env.d.js.map +1 -1
  18. package/dist/cjs/graphql/schemas/2024.1/index.d.ts +32 -0
  19. package/dist/cjs/graphql/schemas/2024.4/index.d.ts +63 -1
  20. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +1 -1
  21. package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js.map +1 -1
  22. package/dist/cjs/keypairs/ed25519/keypair.d.ts +2 -2
  23. package/dist/cjs/keypairs/ed25519/keypair.js +8 -1
  24. package/dist/cjs/keypairs/ed25519/keypair.js.map +2 -2
  25. package/dist/cjs/keypairs/ed25519/publickey.js +1 -1
  26. package/dist/cjs/keypairs/ed25519/publickey.js.map +2 -2
  27. package/dist/cjs/keypairs/secp256k1/keypair.d.ts +2 -2
  28. package/dist/cjs/keypairs/secp256k1/keypair.js +8 -1
  29. package/dist/cjs/keypairs/secp256k1/keypair.js.map +2 -2
  30. package/dist/cjs/keypairs/secp256k1/publickey.js +1 -1
  31. package/dist/cjs/keypairs/secp256k1/publickey.js.map +2 -2
  32. package/dist/cjs/keypairs/secp256r1/keypair.d.ts +2 -2
  33. package/dist/cjs/keypairs/secp256r1/keypair.js +8 -1
  34. package/dist/cjs/keypairs/secp256r1/keypair.js.map +2 -2
  35. package/dist/cjs/keypairs/secp256r1/publickey.js +1 -1
  36. package/dist/cjs/keypairs/secp256r1/publickey.js.map +2 -2
  37. package/dist/cjs/multisig/publickey.js +2 -2
  38. package/dist/cjs/multisig/publickey.js.map +2 -2
  39. package/dist/cjs/multisig/signer.js +2 -2
  40. package/dist/cjs/multisig/signer.js.map +2 -2
  41. package/dist/cjs/transactions/Commands.js +2 -2
  42. package/dist/cjs/transactions/Commands.js.map +2 -2
  43. package/dist/cjs/transactions/Inputs.js +1 -1
  44. package/dist/cjs/transactions/Inputs.js.map +2 -2
  45. package/dist/cjs/transactions/Transaction.js +2 -2
  46. package/dist/cjs/transactions/Transaction.js.map +2 -2
  47. package/dist/cjs/transactions/TransactionData.js +1 -1
  48. package/dist/cjs/transactions/TransactionData.js.map +2 -2
  49. package/dist/cjs/transactions/data/v1.js +6 -6
  50. package/dist/cjs/transactions/data/v1.js.map +2 -2
  51. package/dist/cjs/transactions/executor/parallel.js +1 -1
  52. package/dist/cjs/transactions/executor/parallel.js.map +2 -2
  53. package/dist/cjs/transactions/executor/serial.js +1 -1
  54. package/dist/cjs/transactions/executor/serial.js.map +2 -2
  55. package/dist/cjs/transactions/json-rpc-resolver.js +1 -1
  56. package/dist/cjs/transactions/json-rpc-resolver.js.map +1 -1
  57. package/dist/cjs/utils/dynamic-fields.d.ts +2 -0
  58. package/dist/cjs/utils/dynamic-fields.js +41 -0
  59. package/dist/cjs/utils/dynamic-fields.js.map +7 -0
  60. package/dist/cjs/utils/index.d.ts +2 -1
  61. package/dist/cjs/utils/index.js +9 -1
  62. package/dist/cjs/utils/index.js.map +2 -2
  63. package/dist/cjs/utils/sui-types.js +1 -1
  64. package/dist/cjs/utils/sui-types.js.map +2 -2
  65. package/dist/cjs/verify/verify.js +1 -1
  66. package/dist/cjs/verify/verify.js.map +2 -2
  67. package/dist/cjs/version.d.ts +2 -2
  68. package/dist/cjs/version.js +2 -2
  69. package/dist/cjs/version.js.map +1 -1
  70. package/dist/cjs/zklogin/publickey.js +5 -5
  71. package/dist/cjs/zklogin/publickey.js.map +2 -2
  72. package/dist/cjs/zklogin/signature.js +3 -3
  73. package/dist/cjs/zklogin/signature.js.map +2 -2
  74. package/dist/esm/bcs/bcs.js +15 -15
  75. package/dist/esm/bcs/bcs.js.map +2 -2
  76. package/dist/esm/client/client.js +7 -7
  77. package/dist/esm/client/client.js.map +2 -2
  78. package/dist/esm/client/types/generated.d.ts +1 -2
  79. package/dist/esm/cryptography/keypair.js +3 -3
  80. package/dist/esm/cryptography/keypair.js.map +2 -2
  81. package/dist/esm/cryptography/mnemonics.js +2 -2
  82. package/dist/esm/cryptography/mnemonics.js.map +1 -1
  83. package/dist/esm/cryptography/publickey.js +3 -3
  84. package/dist/esm/cryptography/publickey.js.map +2 -2
  85. package/dist/esm/cryptography/signature.js +3 -3
  86. package/dist/esm/cryptography/signature.js.map +2 -2
  87. package/dist/esm/graphql/schemas/2024.1/index.d.ts +32 -0
  88. package/dist/esm/graphql/schemas/2024.4/index.d.ts +63 -1
  89. package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +2 -2
  90. package/dist/esm/keypairs/ed25519/ed25519-hd-key.js.map +1 -1
  91. package/dist/esm/keypairs/ed25519/keypair.d.ts +2 -2
  92. package/dist/esm/keypairs/ed25519/keypair.js +14 -2
  93. package/dist/esm/keypairs/ed25519/keypair.js.map +2 -2
  94. package/dist/esm/keypairs/ed25519/publickey.js +2 -2
  95. package/dist/esm/keypairs/ed25519/publickey.js.map +2 -2
  96. package/dist/esm/keypairs/secp256k1/keypair.d.ts +2 -2
  97. package/dist/esm/keypairs/secp256k1/keypair.js +9 -2
  98. package/dist/esm/keypairs/secp256k1/keypair.js.map +2 -2
  99. package/dist/esm/keypairs/secp256k1/publickey.js +2 -2
  100. package/dist/esm/keypairs/secp256k1/publickey.js.map +2 -2
  101. package/dist/esm/keypairs/secp256r1/keypair.d.ts +2 -2
  102. package/dist/esm/keypairs/secp256r1/keypair.js +9 -2
  103. package/dist/esm/keypairs/secp256r1/keypair.js.map +2 -2
  104. package/dist/esm/keypairs/secp256r1/publickey.js +2 -2
  105. package/dist/esm/keypairs/secp256r1/publickey.js.map +2 -2
  106. package/dist/esm/multisig/publickey.js +3 -3
  107. package/dist/esm/multisig/publickey.js.map +2 -2
  108. package/dist/esm/multisig/signer.js +3 -3
  109. package/dist/esm/multisig/signer.js.map +2 -2
  110. package/dist/esm/transactions/Commands.js +3 -3
  111. package/dist/esm/transactions/Commands.js.map +2 -2
  112. package/dist/esm/transactions/Inputs.js +2 -2
  113. package/dist/esm/transactions/Inputs.js.map +2 -2
  114. package/dist/esm/transactions/Transaction.js +3 -3
  115. package/dist/esm/transactions/Transaction.js.map +2 -2
  116. package/dist/esm/transactions/TransactionData.js +2 -2
  117. package/dist/esm/transactions/TransactionData.js.map +2 -2
  118. package/dist/esm/transactions/data/v1.js +7 -7
  119. package/dist/esm/transactions/data/v1.js.map +2 -2
  120. package/dist/esm/transactions/executor/parallel.js +2 -2
  121. package/dist/esm/transactions/executor/parallel.js.map +2 -2
  122. package/dist/esm/transactions/executor/serial.js +2 -2
  123. package/dist/esm/transactions/executor/serial.js.map +2 -2
  124. package/dist/esm/transactions/json-rpc-resolver.js +1 -1
  125. package/dist/esm/transactions/json-rpc-resolver.js.map +1 -1
  126. package/dist/esm/utils/dynamic-fields.d.ts +2 -0
  127. package/dist/esm/utils/dynamic-fields.js +21 -0
  128. package/dist/esm/utils/dynamic-fields.js.map +7 -0
  129. package/dist/esm/utils/index.d.ts +2 -1
  130. package/dist/esm/utils/index.js +21 -2
  131. package/dist/esm/utils/index.js.map +2 -2
  132. package/dist/esm/utils/sui-types.js +2 -2
  133. package/dist/esm/utils/sui-types.js.map +2 -2
  134. package/dist/esm/verify/verify.js +2 -2
  135. package/dist/esm/verify/verify.js.map +2 -2
  136. package/dist/esm/version.d.ts +2 -2
  137. package/dist/esm/version.js +2 -2
  138. package/dist/esm/version.js.map +1 -1
  139. package/dist/esm/zklogin/publickey.js +6 -6
  140. package/dist/esm/zklogin/publickey.js.map +2 -2
  141. package/dist/esm/zklogin/signature.js +4 -4
  142. package/dist/esm/zklogin/signature.js.map +2 -2
  143. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  144. package/dist/tsconfig.tsbuildinfo +1 -1
  145. package/package.json +2 -2
  146. package/src/bcs/bcs.ts +15 -15
  147. package/src/client/client.ts +7 -7
  148. package/src/client/types/generated.ts +1 -2
  149. package/src/cryptography/keypair.ts +3 -3
  150. package/src/cryptography/mnemonics.ts +2 -2
  151. package/src/cryptography/publickey.ts +3 -3
  152. package/src/cryptography/signature.ts +3 -3
  153. package/src/graphql/generated/2024.1/schema.graphql +18 -4
  154. package/src/graphql/generated/2024.1/tada-env.d.ts +1 -1
  155. package/src/graphql/generated/2024.4/schema.graphql +33 -5
  156. package/src/graphql/generated/2024.4/tada-env.d.ts +3 -2
  157. package/src/keypairs/ed25519/ed25519-hd-key.ts +2 -2
  158. package/src/keypairs/ed25519/keypair.ts +18 -3
  159. package/src/keypairs/ed25519/publickey.ts +2 -2
  160. package/src/keypairs/secp256k1/keypair.ts +13 -3
  161. package/src/keypairs/secp256k1/publickey.ts +2 -2
  162. package/src/keypairs/secp256r1/keypair.ts +13 -3
  163. package/src/keypairs/secp256r1/publickey.ts +2 -2
  164. package/src/multisig/publickey.ts +3 -3
  165. package/src/multisig/signer.ts +3 -3
  166. package/src/transactions/Commands.ts +3 -3
  167. package/src/transactions/Inputs.ts +2 -2
  168. package/src/transactions/Transaction.ts +3 -3
  169. package/src/transactions/TransactionData.ts +2 -2
  170. package/src/transactions/__tests__/Transaction.test.ts +2 -2
  171. package/src/transactions/__tests__/bcs.test.ts +2 -2
  172. package/src/transactions/data/v1.ts +7 -7
  173. package/src/transactions/executor/parallel.ts +2 -2
  174. package/src/transactions/executor/serial.ts +2 -2
  175. package/src/transactions/json-rpc-resolver.ts +1 -1
  176. package/src/utils/dynamic-fields.ts +30 -0
  177. package/src/utils/index.ts +14 -1
  178. package/src/utils/sui-types.ts +2 -2
  179. package/src/verify/verify.ts +2 -2
  180. package/src/version.ts +2 -2
  181. package/src/zklogin/publickey.ts +6 -6
  182. package/src/zklogin/signature.ts +5 -4
  183. package/dist/cjs/graphql/generated/2024-01/tada-env.d.js +0 -17
  184. package/dist/cjs/graphql/generated/2024-01/tada-env.d.js.map +0 -7
  185. package/dist/esm/graphql/generated/2024-01/tada-env.d.js +0 -1
  186. package/dist/esm/graphql/generated/2024-01/tada-env.d.js.map +0 -7
  187. package/src/graphql/generated/2024-01/tada-env.d.ts +0 -202
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/client/types/generated.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * ######################################\n * ### DO NOT EDIT THIS FILE DIRECTLY ###\n * ######################################\n *\n * This file is generated from:\n * /crates/sui-open-rpc/spec/openrpc.json\n */\n\nexport interface Balance {\n\tcoinObjectCount: number;\n\tcoinType: string;\n\tlockedBalance: {\n\t\t[key: string]: string;\n\t};\n\ttotalBalance: string;\n}\nexport interface BalanceChange {\n\t/**\n\t * The amount indicate the balance value changes, negative amount means spending coin value and\n\t * positive means receiving coin value.\n\t */\n\tamount: string;\n\tcoinType: string;\n\t/** Owner of the balance change */\n\towner: ObjectOwner;\n}\nexport interface Checkpoint {\n\t/** Commitments to checkpoint state */\n\tcheckpointCommitments: CheckpointCommitment[];\n\t/** Checkpoint digest */\n\tdigest: string;\n\t/** Present only on the final checkpoint of the epoch. */\n\tendOfEpochData?: EndOfEpochData | null;\n\t/** Checkpoint's epoch ID */\n\tepoch: string;\n\t/**\n\t * The running total gas costs of all transactions included in the current epoch so far until this\n\t * checkpoint.\n\t */\n\tepochRollingGasCostSummary: GasCostSummary;\n\t/** Total number of transactions committed since genesis, including those in this checkpoint. */\n\tnetworkTotalTransactions: string;\n\t/** Digest of the previous checkpoint */\n\tpreviousDigest?: string | null;\n\t/** Checkpoint sequence number */\n\tsequenceNumber: string;\n\t/**\n\t * Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are\n\t * monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they\n\t * originate from the same underlining consensus commit\n\t */\n\ttimestampMs: string;\n\t/** Transaction digests */\n\ttransactions: string[];\n\t/** Validator Signature */\n\tvalidatorSignature: string;\n}\nexport type CheckpointCommitment = {\n\tECMHLiveObjectSetDigest: ECMHLiveObjectSetDigest;\n};\nexport type CheckpointId = string | string;\n/** A claim consists of value and index_mod_4. */\nexport interface Claim {\n\tindexMod4: number;\n\tvalue: string;\n}\nexport interface CoinStruct {\n\tbalance: string;\n\tcoinObjectId: string;\n\tcoinType: string;\n\tdigest: string;\n\tpreviousTransaction: string;\n\tversion: string;\n}\n/** RPC representation of the [Committee] type. */\nexport interface CommitteeInfo {\n\tepoch: string;\n\tvalidators: [string, string][];\n}\n/** Unlike [enum Signature], [enum CompressedSignature] does not contain public key. */\nexport type CompressedSignature =\n\t| {\n\t\t\tEd25519: string;\n\t }\n\t| {\n\t\t\tSecp256k1: string;\n\t }\n\t| {\n\t\t\tSecp256r1: string;\n\t }\n\t| {\n\t\t\tZkLogin: string;\n\t };\n/** Uses an enum to allow for future expansion of the ConsensusDeterminedVersionAssignments. */\nexport type ConsensusDeterminedVersionAssignments = {\n\tCancelledTransactions: [string, [string, string][]][];\n};\nexport type SuiParsedData =\n\t| {\n\t\t\tdataType: 'moveObject';\n\t\t\tfields: MoveStruct;\n\t\t\thasPublicTransfer: boolean;\n\t\t\ttype: string;\n\t }\n\t| {\n\t\t\tdataType: 'package';\n\t\t\tdisassembled: {\n\t\t\t\t[key: string]: unknown;\n\t\t\t};\n\t };\nexport interface DelegatedStake {\n\tstakes: StakeObject[];\n\t/** Staking pool object id. */\n\tstakingPool: string;\n\t/** Validator's Address. */\n\tvalidatorAddress: string;\n}\n/** Additional rguments supplied to dev inspect beyond what is allowed in today's API. */\nexport interface DevInspectArgs {\n\t/** The gas budget for the transaction. */\n\tgasBudget?: string | null;\n\t/** The gas objects used to pay for the transaction. */\n\tgasObjects?: [string, string, string][] | null;\n\t/** The sponsor of the gas for the transaction, might be different from the sender. */\n\tgasSponsor?: string | null;\n\t/** Whether to return the raw transaction data and effects. */\n\tshowRawTxnDataAndEffects?: boolean | null;\n\t/** Whether to skip transaction checks for the transaction. */\n\tskipChecks?: boolean | null;\n}\n/** The response from processing a dev inspect transaction */\nexport interface DevInspectResults {\n\t/**\n\t * Summary of effects that likely would be generated if the transaction is actually run. Note however,\n\t * that not all dev-inspect transactions are actually usable as transactions so it might not be\n\t * possible actually generate these effects from a normal transaction.\n\t */\n\teffects: TransactionEffects;\n\t/** Execution error from executing the transactions */\n\terror?: string | null;\n\t/** Events that likely would be generated if the transaction is actually run. */\n\tevents: SuiEvent[];\n\t/** The raw effects of the transaction that was dev inspected. */\n\trawEffects?: number[];\n\t/** The raw transaction data that was dev inspected. */\n\trawTxnData?: number[];\n\t/** Execution results (including return values) from executing the transactions */\n\tresults?: SuiExecutionResult[] | null;\n}\nexport interface DisplayFieldsResponse {\n\tdata?: {\n\t\t[key: string]: string;\n\t} | null;\n\terror?: ObjectResponseError | null;\n}\nexport interface DryRunTransactionBlockResponse {\n\tbalanceChanges: BalanceChange[];\n\teffects: TransactionEffects;\n\tevents: SuiEvent[];\n\tinput: TransactionBlockData;\n\tobjectChanges: SuiObjectChange[];\n}\nexport interface DynamicFieldInfo {\n\tbcsName: string;\n\tdigest: string;\n\tname: DynamicFieldName;\n\tobjectId: string;\n\tobjectType: string;\n\ttype: DynamicFieldType;\n\tversion: string;\n}\nexport interface DynamicFieldName {\n\ttype: string;\n\tvalue: unknown;\n}\nexport type DynamicFieldType = 'DynamicField' | 'DynamicObject';\n/** The Sha256 digest of an EllipticCurveMultisetHash committing to the live object set. */\nexport interface ECMHLiveObjectSetDigest {\n\tdigest: number[];\n}\nexport interface EndOfEpochData {\n\t/** Commitments to epoch specific state (e.g. live object set) */\n\tepochCommitments: CheckpointCommitment[];\n\t/**\n\t * next_epoch_committee is `Some` if and only if the current checkpoint is the last checkpoint of an\n\t * epoch. Therefore next_epoch_committee can be used to pick the last checkpoint of an epoch, which is\n\t * often useful to get epoch level summary stats like total gas cost of an epoch, or the total number\n\t * of transactions from genesis to the end of an epoch. The committee is stored as a vector of\n\t * validator pub key and stake pairs. The vector should be sorted based on the Committee data\n\t * structure.\n\t */\n\tnextEpochCommittee: [string, string][];\n\t/**\n\t * The protocol version that is in effect during the epoch that starts immediately after this\n\t * checkpoint.\n\t */\n\tnextEpochProtocolVersion: string;\n}\nexport interface SuiEvent {\n\t/** Base 58 encoded bcs bytes of the move event */\n\tbcs: string;\n\t/**\n\t * Sequential event ID, ie (transaction seq number, event seq number). 1) Serves as a unique event ID\n\t * for each fullnode 2) Also serves to sequence events for the purposes of pagination and querying. A\n\t * higher id is an event seen later by that fullnode. This ID is the \"cursor\" for event querying.\n\t */\n\tid: EventId;\n\t/** Move package where this event was emitted. */\n\tpackageId: string;\n\t/** Parsed json value of the event */\n\tparsedJson: unknown;\n\t/** Sender's Sui address. */\n\tsender: string;\n\t/** UTC timestamp in milliseconds since epoch (1/1/1970) */\n\ttimestampMs?: string | null;\n\t/** Move module where this event was emitted. */\n\ttransactionModule: string;\n\t/** Move event type. */\n\ttype: string;\n}\nexport type SuiEventFilter =\n\t/** Query by sender address. */\n\t| {\n\t\t\tSender: string;\n\t } /** Return events emitted by the given transaction. */\n\t| {\n\t\t\tTransaction: string;\n\t } /** Return events emitted in a specified Package. */\n\t| {\n\t\t\tPackage: string;\n\t } /**\n\t * Return events emitted in a specified Move module. If the event is defined in Module A but emitted in\n\t * a tx with Module B, query `MoveModule` by module B returns the event. Query `MoveEventModule` by\n\t * module A returns the event too.\n\t */\n\t| {\n\t\t\tMoveModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /**\n\t * Return events with the given Move event struct name (struct tag). For example, if the event is\n\t * defined in `0xabcd::MyModule`, and named `Foo`, then the struct tag is `0xabcd::MyModule::Foo`.\n\t */\n\t| {\n\t\t\tMoveEventType: string;\n\t } /**\n\t * Return events with the given Move module name where the event struct is defined. If the event is\n\t * defined in Module A but emitted in a tx with Module B, query `MoveEventModule` by module A returns\n\t * the event. Query `MoveModule` by module B returns the event too.\n\t */\n\t| {\n\t\t\tMoveEventModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tMoveEventField: {\n\t\t\t\tpath: string;\n\t\t\t\tvalue: unknown;\n\t\t\t};\n\t } /** Return events emitted in [start_time, end_time] interval */\n\t| {\n\t\t\tTimeRange: {\n\t\t\t\t/** right endpoint of time interval, milliseconds since epoch, exclusive */\n\t\t\t\tendTime: string;\n\t\t\t\t/** left endpoint of time interval, milliseconds since epoch, inclusive */\n\t\t\t\tstartTime: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tAll: SuiEventFilter[];\n\t }\n\t| {\n\t\t\tAny: SuiEventFilter[];\n\t }\n\t| {\n\t\t\tAnd: [SuiEventFilter, SuiEventFilter];\n\t }\n\t| {\n\t\t\tOr: [SuiEventFilter, SuiEventFilter];\n\t };\n/**\n * Unique ID of a Sui Event, the ID is a combination of tx seq number and event seq number, the ID is\n * local to this particular fullnode and will be different from other fullnode.\n */\nexport interface EventId {\n\teventSeq: string;\n\ttxDigest: string;\n}\nexport type ExecuteTransactionRequestType = 'WaitForEffectsCert' | 'WaitForLocalExecution';\nexport type ExecutionStatus = {\n\tstatus: 'success' | 'failure';\n\terror?: string;\n};\n/**\n * Summary of the charges in a transaction. Storage is charged independently of computation. There are\n * 3 parts to the storage charges: `storage_cost`: it is the charge of storage at the time the\n * transaction is executed. The cost of storage is the number of bytes of the objects being mutated\n * multiplied by a variable storage cost per byte `storage_rebate`: this is the amount a user gets back\n * when manipulating an object. The `storage_rebate` is the `storage_cost` for an object minus fees.\n * `non_refundable_storage_fee`: not all the value of the object storage cost is given back to user and\n * there is a small fraction that is kept by the system. This value tracks that charge.\n *\n * When looking at a gas cost summary the amount charged to the user is\n * `computation_cost + storage_cost - storage_rebate` and that is the amount that is deducted from the\n * gas coins. `non_refundable_storage_fee` is collected from the objects being mutated/deleted and it\n * is tracked by the system in storage funds.\n *\n * Objects deleted, including the older versions of objects mutated, have the storage field on the\n * objects added up to a pool of \"potential rebate\". This rebate then is reduced by the \"nonrefundable\n * rate\" such that:\n * `potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_fee`\n */\nexport interface GasCostSummary {\n\t/** Cost of computation/execution */\n\tcomputationCost: string;\n\t/** The fee for the rebate. The portion of the storage rebate kept by the system. */\n\tnonRefundableStorageFee: string;\n\t/** Storage cost, it's the sum of all storage cost for all objects created or mutated. */\n\tstorageCost: string;\n\t/**\n\t * The amount of storage cost refunded to the user for all objects deleted or mutated in the\n\t * transaction.\n\t */\n\tstorageRebate: string;\n}\nexport interface SuiGasData {\n\tbudget: string;\n\towner: string;\n\tpayment: SuiObjectRef[];\n\tprice: string;\n}\nexport interface GetPastObjectRequest {\n\t/** the ID of the queried object */\n\tobjectId: string;\n\t/** the version of the queried object. */\n\tversion: string;\n}\nexport type InputObjectKind =\n\t| {\n\t\t\tMovePackage: string;\n\t }\n\t| {\n\t\t\tImmOrOwnedMoveObject: SuiObjectRef;\n\t }\n\t| {\n\t\t\tSharedMoveObject: {\n\t\t\t\tid: string;\n\t\t\t\tinitial_shared_version: string;\n\t\t\t\tmutable?: boolean;\n\t\t\t};\n\t };\nexport interface MoveCallParams {\n\targuments: unknown[];\n\tfunction: string;\n\tmodule: string;\n\tpackageObjectId: string;\n\ttypeArguments?: string[];\n}\nexport type SuiMoveFunctionArgType =\n\t| 'Pure'\n\t| {\n\t\t\tObject: ObjectValueKind;\n\t };\nexport type MoveStruct =\n\t| MoveValue[]\n\t| {\n\t\t\tfields: {\n\t\t\t\t[key: string]: MoveValue;\n\t\t\t};\n\t\t\ttype: string;\n\t }\n\t| {\n\t\t\t[key: string]: MoveValue;\n\t };\nexport type MoveValue =\n\t| number\n\t| boolean\n\t| string\n\t| MoveValue[]\n\t| string\n\t| {\n\t\t\tid: string;\n\t }\n\t| MoveStruct\n\t| null\n\t| MoveVariant;\nexport interface MoveVariant {\n\tfields: {\n\t\t[key: string]: MoveValue;\n\t};\n\ttype: string;\n\tvariant: string;\n}\n/** The struct that contains signatures and public keys necessary for authenticating a MultiSig. */\nexport interface MultiSig {\n\t/** A bitmap that indicates the position of which public key the signature should be authenticated with. */\n\tbitmap: number;\n\t/**\n\t * The public key encoded with each public key with its signature scheme used along with the\n\t * corresponding weight.\n\t */\n\tmultisig_pk: MultiSigPublicKey;\n\t/** The plain signature encoded with signature scheme. */\n\tsigs: CompressedSignature[];\n}\n/**\n * Deprecated, use [struct MultiSig] instead. The struct that contains signatures and public keys necessary\n * for authenticating a MultiSigLegacy.\n */\nexport interface MultiSigLegacy {\n\t/** A bitmap that indicates the position of which public key the signature should be authenticated with. */\n\tbitmap: string;\n\t/**\n\t * The public key encoded with each public key with its signature scheme used along with the\n\t * corresponding weight.\n\t */\n\tmultisig_pk: MultiSigPublicKeyLegacy;\n\t/** The plain signature encoded with signature scheme. */\n\tsigs: CompressedSignature[];\n}\n/** The struct that contains the public key used for authenticating a MultiSig. */\nexport interface MultiSigPublicKey {\n\t/** A list of public key and its corresponding weight. */\n\tpk_map: [PublicKey, number][];\n\t/**\n\t * If the total weight of the public keys corresponding to verified signatures is larger than\n\t * threshold, the MultiSig is verified.\n\t */\n\tthreshold: number;\n}\n/**\n * Deprecated, use [struct MultiSigPublicKey] instead. The struct that contains the public key used for\n * authenticating a MultiSig.\n */\nexport interface MultiSigPublicKeyLegacy {\n\t/** A list of public key and its corresponding weight. */\n\tpk_map: [PublicKey, number][];\n\t/**\n\t * If the total weight of the public keys corresponding to verified signatures is larger than\n\t * threshold, the MultiSig is verified.\n\t */\n\tthreshold: number;\n}\n/**\n * ObjectChange are derived from the object mutations in the TransactionEffect to provide richer object\n * information.\n */\nexport type SuiObjectChange =\n\t/** Module published */\n\t| {\n\t\t\tdigest: string;\n\t\t\tmodules: string[];\n\t\t\tpackageId: string;\n\t\t\ttype: 'published';\n\t\t\tversion: string;\n\t } /** Transfer objects to new address / wrap in another object */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\trecipient: ObjectOwner;\n\t\t\tsender: string;\n\t\t\ttype: 'transferred';\n\t\t\tversion: string;\n\t } /** Object mutated. */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\towner: ObjectOwner;\n\t\t\tpreviousVersion: string;\n\t\t\tsender: string;\n\t\t\ttype: 'mutated';\n\t\t\tversion: string;\n\t } /** Delete object */\n\t| {\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\tsender: string;\n\t\t\ttype: 'deleted';\n\t\t\tversion: string;\n\t } /** Wrapped object */\n\t| {\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\tsender: string;\n\t\t\ttype: 'wrapped';\n\t\t\tversion: string;\n\t } /** New object creation */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\towner: ObjectOwner;\n\t\t\tsender: string;\n\t\t\ttype: 'created';\n\t\t\tversion: string;\n\t };\nexport interface SuiObjectData {\n\t/**\n\t * Move object content or package content in BCS, default to be None unless\n\t * SuiObjectDataOptions.showBcs is set to true\n\t */\n\tbcs?: RawData | null;\n\t/**\n\t * Move object content or package content, default to be None unless SuiObjectDataOptions.showContent\n\t * is set to true\n\t */\n\tcontent?: SuiParsedData | null;\n\t/** Base64 string representing the object digest */\n\tdigest: string;\n\t/**\n\t * The Display metadata for frontend UI rendering, default to be None unless\n\t * SuiObjectDataOptions.showContent is set to true This can also be None if the struct type does not\n\t * have Display defined See more details in <https://forums.sui.io/t/nft-object-display-proposal/4872>\n\t */\n\tdisplay?: DisplayFieldsResponse | null;\n\tobjectId: string;\n\t/** The owner of this object. Default to be None unless SuiObjectDataOptions.showOwner is set to true */\n\towner?: ObjectOwner | null;\n\t/**\n\t * The digest of the transaction that created or last mutated this object. Default to be None unless\n\t * SuiObjectDataOptions.showPreviousTransaction is set to true\n\t */\n\tpreviousTransaction?: string | null;\n\t/**\n\t * The amount of SUI we would rebate if this object gets deleted. This number is re-calculated each\n\t * time the object is mutated based on the present storage gas price.\n\t */\n\tstorageRebate?: string | null;\n\t/** The type of the object. Default to be None unless SuiObjectDataOptions.showType is set to true */\n\ttype?: string | null;\n\t/** Object version. */\n\tversion: string;\n}\nexport interface SuiObjectDataOptions {\n\t/** Whether to show the content in BCS format. Default to be False */\n\tshowBcs?: boolean;\n\t/**\n\t * Whether to show the content(i.e., package content or Move struct content) of the object. Default to\n\t * be False\n\t */\n\tshowContent?: boolean;\n\t/** Whether to show the Display metadata of the object for frontend rendering. Default to be False */\n\tshowDisplay?: boolean;\n\t/** Whether to show the owner of the object. Default to be False */\n\tshowOwner?: boolean;\n\t/** Whether to show the previous transaction digest of the object. Default to be False */\n\tshowPreviousTransaction?: boolean;\n\t/** Whether to show the storage rebate of the object. Default to be False */\n\tshowStorageRebate?: boolean;\n\t/** Whether to show the type of the object. Default to be False */\n\tshowType?: boolean;\n}\nexport type ObjectRead =\n\t/** The object exists and is found with this version */\n\t| {\n\t\t\tdetails: SuiObjectData;\n\t\t\tstatus: 'VersionFound';\n\t } /** The object does not exist */\n\t| {\n\t\t\tdetails: string;\n\t\t\tstatus: 'ObjectNotExists';\n\t } /** The object is found to be deleted with this version */\n\t| {\n\t\t\tdetails: SuiObjectRef;\n\t\t\tstatus: 'ObjectDeleted';\n\t } /** The object exists but not found with this version */\n\t| {\n\t\t\tdetails: [string, string];\n\t\t\tstatus: 'VersionNotFound';\n\t } /** The asked object version is higher than the latest */\n\t| {\n\t\t\tdetails: {\n\t\t\t\tasked_version: string;\n\t\t\t\tlatest_version: string;\n\t\t\t\tobject_id: string;\n\t\t\t};\n\t\t\tstatus: 'VersionTooHigh';\n\t };\nexport interface SuiObjectRef {\n\t/** Base64 string representing the object digest */\n\tdigest: string;\n\t/** Hex code as string representing the object id */\n\tobjectId: string;\n\t/** Object version. */\n\tversion: string;\n}\nexport type ObjectResponseError =\n\t| {\n\t\t\tcode: 'notExists';\n\t\t\tobject_id: string;\n\t }\n\t| {\n\t\t\tcode: 'dynamicFieldNotFound';\n\t\t\tparent_object_id: string;\n\t }\n\t| {\n\t\t\tcode: 'deleted';\n\t\t\t/** Base64 string representing the object digest */\n\t\t\tdigest: string;\n\t\t\tobject_id: string;\n\t\t\t/** Object version. */\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\tcode: 'unknown';\n\t }\n\t| {\n\t\t\tcode: 'displayError';\n\t\t\terror: string;\n\t };\nexport interface SuiObjectResponseQuery {\n\t/** If None, no filter will be applied */\n\tfilter?: SuiObjectDataFilter | null;\n\t/** config which fields to include in the response, by default only digest is included */\n\toptions?: SuiObjectDataOptions | null;\n}\nexport type ObjectValueKind = 'ByImmutableReference' | 'ByMutableReference' | 'ByValue';\nexport interface OwnedObjectRef {\n\towner: ObjectOwner;\n\treference: SuiObjectRef;\n}\nexport type ObjectOwner =\n\t/** Object is exclusively owned by a single address, and is mutable. */\n\t| {\n\t\t\tAddressOwner: string;\n\t } /**\n\t * Object is exclusively owned by a single object, and is mutable. The object ID is converted to\n\t * SuiAddress as SuiAddress is universal.\n\t */\n\t| {\n\t\t\tObjectOwner: string;\n\t } /** Object is shared, can be used by any address, and is mutable. */\n\t| {\n\t\t\tShared: {\n\t\t\t\t/** The version at which the object became shared */\n\t\t\t\tinitial_shared_version: string;\n\t\t\t};\n\t }\n\t| 'Immutable';\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedCheckpoints {\n\tdata: Checkpoint[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedCoins {\n\tdata: CoinStruct[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedDynamicFieldInfos {\n\tdata: DynamicFieldInfo[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedEvents {\n\tdata: SuiEvent[];\n\thasNextPage: boolean;\n\tnextCursor?: EventId | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedStrings {\n\tdata: string[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedObjectsResponse {\n\tdata: SuiObjectResponse[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedTransactionResponse {\n\tdata: SuiTransactionBlockResponse[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * An passkey authenticator with parsed fields. See field defition below. Can be initialized from\n * [struct RawPasskeyAuthenticator].\n */\nexport interface PasskeyAuthenticator {\n\t/**\n\t * `authenticatorData` is a bytearray that encodes\n\t * [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) structure returned\n\t * by the authenticator attestation response as is.\n\t */\n\tauthenticator_data: number[];\n\t/**\n\t * `clientDataJSON` contains a JSON-compatible UTF-8 encoded string of the client data which is passed\n\t * to the authenticator by the client during the authentication request (see\n\t * [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata))\n\t */\n\tclient_data_json: string;\n}\nexport interface ProtocolConfig {\n\tattributes: {\n\t\t[key: string]: ProtocolConfigValue | null;\n\t};\n\tfeatureFlags: {\n\t\t[key: string]: boolean;\n\t};\n\tmaxSupportedProtocolVersion: string;\n\tminSupportedProtocolVersion: string;\n\tprotocolVersion: string;\n}\nexport type ProtocolConfigValue =\n\t| {\n\t\t\tu16: string;\n\t }\n\t| {\n\t\t\tu32: string;\n\t }\n\t| {\n\t\t\tu64: string;\n\t }\n\t| {\n\t\t\tf64: string;\n\t }\n\t| {\n\t\t\tbool: string;\n\t };\nexport type PublicKey =\n\t| {\n\t\t\tEd25519: string;\n\t }\n\t| {\n\t\t\tSecp256k1: string;\n\t }\n\t| {\n\t\t\tSecp256r1: string;\n\t }\n\t| {\n\t\t\tZkLogin: string;\n\t }\n\t| {\n\t\t\tPasskey: string;\n\t };\nexport type RPCTransactionRequestParams =\n\t| {\n\t\t\ttransferObjectRequestParams: TransferObjectParams;\n\t }\n\t| {\n\t\t\tmoveCallRequestParams: MoveCallParams;\n\t };\nexport type RawData =\n\t| {\n\t\t\tbcsBytes: string;\n\t\t\tdataType: 'moveObject';\n\t\t\thasPublicTransfer: boolean;\n\t\t\ttype: string;\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\tdataType: 'package';\n\t\t\tid: string;\n\t\t\tlinkageTable: {\n\t\t\t\t[key: string]: UpgradeInfo;\n\t\t\t};\n\t\t\tmoduleMap: {\n\t\t\t\t[key: string]: string;\n\t\t\t};\n\t\t\ttypeOriginTable: TypeOrigin[];\n\t\t\tversion: string;\n\t };\nexport type Signature =\n\t| {\n\t\t\tEd25519SuiSignature: string;\n\t }\n\t| {\n\t\t\tSecp256k1SuiSignature: string;\n\t }\n\t| {\n\t\t\tSecp256r1SuiSignature: string;\n\t };\nexport type StakeObject =\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\tstatus: 'Pending';\n\t }\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\testimatedReward: string;\n\t\t\tstatus: 'Active';\n\t }\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\tstatus: 'Unstaked';\n\t };\nexport interface SuiActiveJwk {\n\tepoch: string;\n\tjwk: SuiJWK;\n\tjwk_id: SuiJwkId;\n}\n/** An argument to a transaction in a programmable transaction block */\nexport type SuiArgument =\n\t| 'GasCoin' /** One of the input objects or primitive values (from `ProgrammableTransactionBlock` inputs) */\n\t| {\n\t\t\tInput: number;\n\t } /** The result of another transaction (from `ProgrammableTransactionBlock` transactions) */\n\t| {\n\t\t\tResult: number;\n\t } /**\n\t * Like a `Result` but it accesses a nested result. Currently, the only usage of this is to access a\n\t * value from a Move call with multiple return values.\n\t */\n\t| {\n\t\t\tNestedResult: [number, number];\n\t };\nexport interface SuiAuthenticatorStateExpire {\n\tmin_epoch: string;\n}\nexport type SuiCallArg =\n\t| {\n\t\t\ttype: 'object';\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'immOrOwnedObject';\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\ttype: 'object';\n\t\t\tinitialSharedVersion: string;\n\t\t\tmutable: boolean;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'sharedObject';\n\t }\n\t| {\n\t\t\ttype: 'object';\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'receiving';\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\ttype: 'pure';\n\t\t\tvalue: unknown;\n\t\t\tvalueType?: string | null;\n\t };\nexport interface SuiChangeEpoch {\n\tcomputation_charge: string;\n\tepoch: string;\n\tepoch_start_timestamp_ms: string;\n\tstorage_charge: string;\n\tstorage_rebate: string;\n}\nexport interface CoinMetadata {\n\t/** Number of decimal places the coin uses. */\n\tdecimals: number;\n\t/** Description of the token */\n\tdescription: string;\n\t/** URL for the token logo */\n\ticonUrl?: string | null;\n\t/** Object id for the CoinMetadata object */\n\tid?: string | null;\n\t/** Name for the token */\n\tname: string;\n\t/** Symbol for the token */\n\tsymbol: string;\n}\nexport type SuiEndOfEpochTransactionKind =\n\t| 'AuthenticatorStateCreate'\n\t| 'RandomnessStateCreate'\n\t| 'CoinDenyListStateCreate'\n\t| {\n\t\t\tChangeEpoch: SuiChangeEpoch;\n\t }\n\t| {\n\t\t\tAuthenticatorStateExpire: SuiAuthenticatorStateExpire;\n\t }\n\t| {\n\t\t\tBridgeStateCreate: string;\n\t }\n\t| {\n\t\t\tBridgeCommitteeUpdate: string;\n\t };\nexport interface SuiExecutionResult {\n\t/** The value of any arguments that were mutably borrowed. Non-mut borrowed values are not included */\n\tmutableReferenceOutputs?: [SuiArgument, number[], string][];\n\t/** The return values from the transaction */\n\treturnValues?: [number[], string][];\n}\nexport interface SuiJWK {\n\talg: string;\n\te: string;\n\tkty: string;\n\tn: string;\n}\nexport interface SuiJwkId {\n\tiss: string;\n\tkid: string;\n}\nexport type SuiMoveAbility = 'Copy' | 'Drop' | 'Store' | 'Key';\nexport interface SuiMoveAbilitySet {\n\tabilities: SuiMoveAbility[];\n}\nexport interface SuiMoveModuleId {\n\taddress: string;\n\tname: string;\n}\nexport interface SuiMoveNormalizedField {\n\tname: string;\n\ttype: SuiMoveNormalizedType;\n}\nexport interface SuiMoveNormalizedFunction {\n\tisEntry: boolean;\n\tparameters: SuiMoveNormalizedType[];\n\treturn: SuiMoveNormalizedType[];\n\ttypeParameters: SuiMoveAbilitySet[];\n\tvisibility: SuiMoveVisibility;\n}\nexport interface SuiMoveNormalizedModule {\n\taddress: string;\n\texposedFunctions: {\n\t\t[key: string]: SuiMoveNormalizedFunction;\n\t};\n\tfileFormatVersion: number;\n\tfriends: SuiMoveModuleId[];\n\tname: string;\n\tstructs: {\n\t\t[key: string]: SuiMoveNormalizedStruct;\n\t};\n}\nexport interface SuiMoveNormalizedStruct {\n\tabilities: SuiMoveAbilitySet;\n\tfields: SuiMoveNormalizedField[];\n\ttypeParameters: SuiMoveStructTypeParameter[];\n}\nexport type SuiMoveNormalizedType =\n\t| 'Bool'\n\t| 'U8'\n\t| 'U16'\n\t| 'U32'\n\t| 'U64'\n\t| 'U128'\n\t| 'U256'\n\t| 'Address'\n\t| 'Signer'\n\t| {\n\t\t\tStruct: {\n\t\t\t\taddress: string;\n\t\t\t\tmodule: string;\n\t\t\t\tname: string;\n\t\t\t\ttypeArguments: SuiMoveNormalizedType[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tVector: SuiMoveNormalizedType;\n\t }\n\t| {\n\t\t\tTypeParameter: number;\n\t }\n\t| {\n\t\t\tReference: SuiMoveNormalizedType;\n\t }\n\t| {\n\t\t\tMutableReference: SuiMoveNormalizedType;\n\t };\nexport interface SuiMoveStructTypeParameter {\n\tconstraints: SuiMoveAbilitySet;\n\tisPhantom: boolean;\n}\nexport type SuiMoveVisibility = 'Private' | 'Public' | 'Friend';\nexport type SuiObjectDataFilter =\n\t| {\n\t\t\tMatchAll: SuiObjectDataFilter[];\n\t }\n\t| {\n\t\t\tMatchAny: SuiObjectDataFilter[];\n\t }\n\t| {\n\t\t\tMatchNone: SuiObjectDataFilter[];\n\t } /** Query by type a specified Package. */\n\t| {\n\t\t\tPackage: string;\n\t } /** Query by type a specified Move module. */\n\t| {\n\t\t\tMoveModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /** Query by type */\n\t| {\n\t\t\tStructType: string;\n\t }\n\t| {\n\t\t\tAddressOwner: string;\n\t }\n\t| {\n\t\t\tObjectOwner: string;\n\t }\n\t| {\n\t\t\tObjectId: string;\n\t }\n\t| {\n\t\t\tObjectIds: string[];\n\t }\n\t| {\n\t\t\tVersion: string;\n\t };\nexport interface SuiObjectResponse {\n\tdata?: SuiObjectData | null;\n\terror?: ObjectResponseError | null;\n}\n/**\n * The transaction for calling a Move function, either an entry function or a public function (which\n * cannot return references).\n */\nexport interface MoveCallSuiTransaction {\n\t/** The arguments to the function. */\n\targuments?: SuiArgument[];\n\t/** The function to be called. */\n\tfunction: string;\n\t/** The specific module in the package containing the function. */\n\tmodule: string;\n\t/** The package containing the module and function. */\n\tpackage: string;\n\t/** The type arguments to the function. */\n\ttype_arguments?: string[];\n}\n/**\n * This is the JSON-RPC type for the SUI system state object. It flattens all fields to make them\n * top-level fields such that it as minimum dependencies to the internal data structures of the SUI\n * system state type.\n */\nexport interface SuiSystemStateSummary {\n\t/** The list of active validators in the current epoch. */\n\tactiveValidators: SuiValidatorSummary[];\n\t/** Map storing the number of epochs for which each validator has been below the low stake threshold. */\n\tatRiskValidators: [string, string][];\n\t/** The current epoch ID, starting from 0. */\n\tepoch: string;\n\t/** The duration of an epoch, in milliseconds. */\n\tepochDurationMs: string;\n\t/** Unix timestamp of the current epoch start */\n\tepochStartTimestampMs: string;\n\t/**\n\t * ID of the object that maps from a staking pool ID to the inactive validator that has that pool as\n\t * its staking pool.\n\t */\n\tinactivePoolsId: string;\n\t/** Number of inactive staking pools. */\n\tinactivePoolsSize: string;\n\t/**\n\t * Maximum number of active validators at any moment. We do not allow the number of validators in any\n\t * epoch to go above this.\n\t */\n\tmaxValidatorCount: string;\n\t/** Lower-bound on the amount of stake required to become a validator. */\n\tminValidatorJoiningStake: string;\n\t/** ID of the object that contains the list of new validators that will join at the end of the epoch. */\n\tpendingActiveValidatorsId: string;\n\t/** Number of new validators that will join at the end of the epoch. */\n\tpendingActiveValidatorsSize: string;\n\t/** Removal requests from the validators. Each element is an index pointing to `active_validators`. */\n\tpendingRemovals: string[];\n\t/** The current protocol version, starting from 1. */\n\tprotocolVersion: string;\n\t/** The reference gas price for the current epoch. */\n\treferenceGasPrice: string;\n\t/**\n\t * Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set\n\t * whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can\n\t * be reset once we are able to successfully execute advance_epoch.\n\t */\n\tsafeMode: boolean;\n\t/** Amount of computation rewards accumulated (and not yet distributed) during safe mode. */\n\tsafeModeComputationRewards: string;\n\t/** Amount of non-refundable storage fee accumulated during safe mode. */\n\tsafeModeNonRefundableStorageFee: string;\n\t/** Amount of storage rebates accumulated (and not yet burned) during safe mode. */\n\tsafeModeStorageRebates: string;\n\t/** Amount of storage rewards accumulated (and not yet distributed) during safe mode. */\n\tsafeModeStorageRewards: string;\n\t/** Balance of SUI set aside for stake subsidies that will be drawn down over time. */\n\tstakeSubsidyBalance: string;\n\t/** The amount of stake subsidy to be drawn down per epoch. This amount decays and decreases over time. */\n\tstakeSubsidyCurrentDistributionAmount: string;\n\t/**\n\t * The rate at which the distribution amount decays at the end of each period. Expressed in basis\n\t * points.\n\t */\n\tstakeSubsidyDecreaseRate: number;\n\t/**\n\t * This counter may be different from the current epoch number if in some epochs we decide to skip the\n\t * subsidy.\n\t */\n\tstakeSubsidyDistributionCounter: string;\n\t/** Number of distributions to occur before the distribution amount decays. */\n\tstakeSubsidyPeriodLength: string;\n\t/** The starting epoch in which stake subsidies start being paid out */\n\tstakeSubsidyStartEpoch: string;\n\t/** ID of the object that maps from staking pool's ID to the sui address of a validator. */\n\tstakingPoolMappingsId: string;\n\t/** Number of staking pool mappings. */\n\tstakingPoolMappingsSize: string;\n\t/**\n\t * The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable\n\t * storage rebates and any leftover staking rewards.\n\t */\n\tstorageFundNonRefundableBalance: string;\n\t/** The storage rebates of all the objects on-chain stored in the storage fund. */\n\tstorageFundTotalObjectStorageRebates: string;\n\t/** The current version of the system state data structure type. */\n\tsystemStateVersion: string;\n\t/** Total amount of stake from all active validators at the beginning of the epoch. */\n\ttotalStake: string;\n\t/**\n\t * ID of the object that stores preactive validators, mapping their addresses to their `Validator`\n\t * structs.\n\t */\n\tvalidatorCandidatesId: string;\n\t/** Number of preactive validators. */\n\tvalidatorCandidatesSize: string;\n\t/**\n\t * A validator can have stake below `validator_low_stake_threshold` for this many epochs before being\n\t * kicked out.\n\t */\n\tvalidatorLowStakeGracePeriod: string;\n\t/**\n\t * Validators with stake amount below `validator_low_stake_threshold` are considered to have low stake\n\t * and will be escorted out of the validator set after being below this threshold for more than\n\t * `validator_low_stake_grace_period` number of epochs.\n\t */\n\tvalidatorLowStakeThreshold: string;\n\t/** A map storing the records of validator reporting each other. */\n\tvalidatorReportRecords: [string, string[]][];\n\t/**\n\t * Validators with stake below `validator_very_low_stake_threshold` will be removed immediately at\n\t * epoch change, no grace period.\n\t */\n\tvalidatorVeryLowStakeThreshold: string;\n}\n/** A single transaction in a programmable transaction block. */\nexport type SuiTransaction =\n\t/** A call to either an entry or a public Move function */\n\t| {\n\t\t\tMoveCall: MoveCallSuiTransaction;\n\t } /**\n\t * `(Vec<forall T:key+store. T>, address)` It sends n-objects to the specified address. These objects\n\t * must have store (public transfer) and either the previous owner must be an address or the object\n\t * must be newly created.\n\t */\n\t| {\n\t\t\tTransferObjects: [SuiArgument[], SuiArgument];\n\t } /**\n\t * `(&mut Coin<T>, Vec<u64>)` -> `Vec<Coin<T>>` It splits off some amounts into a new coins with those\n\t * amounts\n\t */\n\t| {\n\t\t\tSplitCoins: [SuiArgument, SuiArgument[]];\n\t } /** `(&mut Coin<T>, Vec<Coin<T>>)` It merges n-coins into the first coin */\n\t| {\n\t\t\tMergeCoins: [SuiArgument, SuiArgument[]];\n\t } /**\n\t * Publishes a Move package. It takes the package bytes and a list of the package's transitive\n\t * dependencies to link against on-chain.\n\t */\n\t| {\n\t\t\tPublish: string[];\n\t } /** Upgrades a Move package */\n\t| {\n\t\t\tUpgrade: [string[], string, SuiArgument];\n\t } /**\n\t * `forall T: Vec<T> -> vector<T>` Given n-values of the same type, it constructs a vector. For non\n\t * objects or an empty vector, the type tag must be specified.\n\t */\n\t| {\n\t\t\tMakeMoveVec: [string | null, SuiArgument[]];\n\t };\nexport type SuiTransactionBlockBuilderMode = 'Commit' | 'DevInspect';\n/**\n * This is the JSON-RPC type for the SUI validator. It flattens all inner structures to top-level\n * fields so that they are decoupled from the internal definitions.\n */\nexport interface SuiValidatorSummary {\n\tcommissionRate: string;\n\tdescription: string;\n\t/** ID of the exchange rate table object. */\n\texchangeRatesId: string;\n\t/** Number of exchange rates in the table. */\n\texchangeRatesSize: string;\n\tgasPrice: string;\n\timageUrl: string;\n\tname: string;\n\tnetAddress: string;\n\tnetworkPubkeyBytes: string;\n\tnextEpochCommissionRate: string;\n\tnextEpochGasPrice: string;\n\tnextEpochNetAddress?: string | null;\n\tnextEpochNetworkPubkeyBytes?: string | null;\n\tnextEpochP2pAddress?: string | null;\n\tnextEpochPrimaryAddress?: string | null;\n\tnextEpochProofOfPossession?: string | null;\n\tnextEpochProtocolPubkeyBytes?: string | null;\n\tnextEpochStake: string;\n\tnextEpochWorkerAddress?: string | null;\n\tnextEpochWorkerPubkeyBytes?: string | null;\n\toperationCapId: string;\n\tp2pAddress: string;\n\t/** Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. */\n\tpendingPoolTokenWithdraw: string;\n\t/** Pending stake amount for this epoch. */\n\tpendingStake: string;\n\t/** Pending stake withdrawn during the current epoch, emptied at epoch boundaries. */\n\tpendingTotalSuiWithdraw: string;\n\t/** Total number of pool tokens issued by the pool. */\n\tpoolTokenBalance: string;\n\tprimaryAddress: string;\n\tprojectUrl: string;\n\tproofOfPossessionBytes: string;\n\tprotocolPubkeyBytes: string;\n\t/** The epoch stake rewards will be added here at the end of each epoch. */\n\trewardsPool: string;\n\t/** The epoch at which this pool became active. */\n\tstakingPoolActivationEpoch?: string | null;\n\t/** The epoch at which this staking pool ceased to be active. `None` = {pre-active, active}, */\n\tstakingPoolDeactivationEpoch?: string | null;\n\t/** ID of the staking pool object. */\n\tstakingPoolId: string;\n\t/** The total number of SUI tokens in this pool. */\n\tstakingPoolSuiBalance: string;\n\tsuiAddress: string;\n\tvotingPower: string;\n\tworkerAddress: string;\n\tworkerPubkeyBytes: string;\n}\nexport interface CoinSupply {\n\tvalue: string;\n}\nexport interface SuiTransactionBlock {\n\tdata: TransactionBlockData;\n\ttxSignatures: string[];\n}\nexport interface TransactionBlockBytes {\n\t/** the gas objects to be used */\n\tgas: SuiObjectRef[];\n\t/** objects to be used in this transaction */\n\tinputObjects: InputObjectKind[];\n\t/** BCS serialized transaction data bytes without its type tag, as base-64 encoded string. */\n\ttxBytes: string;\n}\nexport type TransactionBlockData = {\n\tgasData: SuiGasData;\n\tmessageVersion: 'v1';\n\tsender: string;\n\ttransaction: SuiTransactionBlockKind;\n};\nexport type TransactionEffects =\n\t/** The response from processing a transaction or a certified transaction */\n\t{\n\t\t/** ObjectRef and owner of new objects created. */\n\t\tcreated?: OwnedObjectRef[];\n\t\t/** Object Refs of objects now deleted (the old refs). */\n\t\tdeleted?: SuiObjectRef[];\n\t\t/** The set of transaction digests this transaction depends on. */\n\t\tdependencies?: string[];\n\t\t/**\n\t\t * The digest of the events emitted during execution, can be None if the transaction does not emit any\n\t\t * event.\n\t\t */\n\t\teventsDigest?: string | null;\n\t\t/** The epoch when this transaction was executed. */\n\t\texecutedEpoch: string;\n\t\t/**\n\t\t * The updated gas object reference. Have a dedicated field for convenient access. It's also included\n\t\t * in mutated.\n\t\t */\n\t\tgasObject: OwnedObjectRef;\n\t\tgasUsed: GasCostSummary;\n\t\tmessageVersion: 'v1';\n\t\t/**\n\t\t * The version that every modified (mutated or deleted) object had before it was modified by this\n\t\t * transaction.\n\t\t */\n\t\tmodifiedAtVersions?: TransactionBlockEffectsModifiedAtVersions[];\n\t\t/** ObjectRef and owner of mutated objects, including gas object. */\n\t\tmutated?: OwnedObjectRef[];\n\t\t/**\n\t\t * The object references of the shared objects used in this transaction. Empty if no shared objects\n\t\t * were used.\n\t\t */\n\t\tsharedObjects?: SuiObjectRef[];\n\t\t/** The status of the execution */\n\t\tstatus: ExecutionStatus;\n\t\t/** The transaction digest */\n\t\ttransactionDigest: string;\n\t\t/**\n\t\t * ObjectRef and owner of objects that are unwrapped in this transaction. Unwrapped objects are objects\n\t\t * that were wrapped into other objects in the past, and just got extracted out.\n\t\t */\n\t\tunwrapped?: OwnedObjectRef[];\n\t\t/** Object refs of objects previously wrapped in other objects but now deleted. */\n\t\tunwrappedThenDeleted?: SuiObjectRef[];\n\t\t/** Object refs of objects now wrapped in other objects. */\n\t\twrapped?: SuiObjectRef[];\n\t};\nexport interface TransactionBlockEffectsModifiedAtVersions {\n\tobjectId: string;\n\tsequenceNumber: string;\n}\nexport type SuiTransactionBlockKind =\n\t/** A system transaction that will update epoch information on-chain. */\n\t| {\n\t\t\tcomputation_charge: string;\n\t\t\tepoch: string;\n\t\t\tepoch_start_timestamp_ms: string;\n\t\t\tkind: 'ChangeEpoch';\n\t\t\tstorage_charge: string;\n\t\t\tstorage_rebate: string;\n\t } /** A system transaction used for initializing the initial state of the chain. */\n\t| {\n\t\t\tkind: 'Genesis';\n\t\t\tobjects: string[];\n\t } /** A system transaction marking the start of a series of transactions scheduled as part of a checkpoint */\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologue';\n\t\t\tround: string;\n\t } /** A series of transactions where the results of one transaction can be used in future transactions */\n\t| {\n\t\t\t/** Input objects or primitive values */\n\t\t\tinputs: SuiCallArg[];\n\t\t\tkind: 'ProgrammableTransaction';\n\t\t\t/**\n\t\t\t * The transactions to be executed sequentially. A failure in any transaction will result in the\n\t\t\t * failure of the entire programmable transaction block.\n\t\t\t */\n\t\t\ttransactions: SuiTransaction[];\n\t } /** A transaction which updates global authenticator state */\n\t| {\n\t\t\tepoch: string;\n\t\t\tkind: 'AuthenticatorStateUpdate';\n\t\t\tnew_active_jwks: SuiActiveJwk[];\n\t\t\tround: string;\n\t } /** A transaction which updates global randomness state */\n\t| {\n\t\t\tepoch: string;\n\t\t\tkind: 'RandomnessStateUpdate';\n\t\t\trandom_bytes: number[];\n\t\t\trandomness_round: string;\n\t } /** The transaction which occurs only at the end of the epoch */\n\t| {\n\t\t\tkind: 'EndOfEpochTransaction';\n\t\t\ttransactions: SuiEndOfEpochTransactionKind[];\n\t }\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tconsensus_commit_digest: string;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologueV2';\n\t\t\tround: string;\n\t }\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tconsensus_commit_digest: string;\n\t\t\tconsensus_determined_version_assignments: ConsensusDeterminedVersionAssignments;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologueV3';\n\t\t\tround: string;\n\t\t\tsub_dag_index?: string | null;\n\t };\nexport interface SuiTransactionBlockResponse {\n\tbalanceChanges?: BalanceChange[] | null;\n\t/**\n\t * The checkpoint number when this transaction was included and hence finalized. This is only returned\n\t * in the read api, not in the transaction execution api.\n\t */\n\tcheckpoint?: string | null;\n\tconfirmedLocalExecution?: boolean | null;\n\tdigest: string;\n\teffects?: TransactionEffects | null;\n\terrors?: string[];\n\tevents?: SuiEvent[] | null;\n\tobjectChanges?: SuiObjectChange[] | null;\n\trawEffects?: number[];\n\t/**\n\t * BCS encoded [SenderSignedData] that includes input object references returns empty array if\n\t * `show_raw_transaction` is false\n\t */\n\trawTransaction?: string;\n\ttimestampMs?: string | null;\n\t/** Transaction input data */\n\ttransaction?: SuiTransactionBlock | null;\n}\nexport interface SuiTransactionBlockResponseOptions {\n\t/** Whether to show balance_changes. Default to be False */\n\tshowBalanceChanges?: boolean;\n\t/** Whether to show transaction effects. Default to be False */\n\tshowEffects?: boolean;\n\t/** Whether to show transaction events. Default to be False */\n\tshowEvents?: boolean;\n\t/** Whether to show transaction input data. Default to be False */\n\tshowInput?: boolean;\n\t/** Whether to show object_changes. Default to be False */\n\tshowObjectChanges?: boolean;\n\t/** Whether to show raw transaction effects. Default to be False */\n\tshowRawEffects?: boolean;\n\t/** Whether to show bcs-encoded transaction input data */\n\tshowRawInput?: boolean;\n}\nexport interface SuiTransactionBlockResponseQuery {\n\t/** If None, no filter will be applied */\n\tfilter?: TransactionFilter | null;\n\t/** config which fields to include in the response, by default only digest is included */\n\toptions?: SuiTransactionBlockResponseOptions | null;\n}\nexport type TransactionFilter =\n\t/** Query by checkpoint. */\n\t| {\n\t\t\tCheckpoint: string;\n\t } /** Query by move function. */\n\t| {\n\t\t\tMoveFunction: {\n\t\t\t\tfunction?: string | null;\n\t\t\t\tmodule?: string | null;\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /** Query by input object. */\n\t| {\n\t\t\tInputObject: string;\n\t } /** Query by changed object, including created, mutated and unwrapped objects. */\n\t| {\n\t\t\tChangedObject: string;\n\t } /** Query by sender address. */\n\t| {\n\t\t\tFromAddress: string;\n\t } /** Query by recipient address. */\n\t| {\n\t\t\tToAddress: string;\n\t } /** Query by sender and recipient address. */\n\t| {\n\t\t\tFromAndToAddress: {\n\t\t\t\tfrom: string;\n\t\t\t\tto: string;\n\t\t\t};\n\t } /** Query txs that have a given address as sender or recipient. */\n\t| {\n\t\t\tFromOrToAddress: {\n\t\t\t\taddr: string;\n\t\t\t};\n\t } /** Query by transaction kind */\n\t| {\n\t\t\tTransactionKind: string;\n\t } /** Query transactions of any given kind in the input. */\n\t| {\n\t\t\tTransactionKindIn: string[];\n\t };\nexport interface TransferObjectParams {\n\tobjectId: string;\n\trecipient: string;\n}\n/** Identifies a struct and the module it was defined in */\nexport interface TypeOrigin {\n\tdatatype_name: string;\n\tmodule_name: string;\n\tpackage: string;\n}\n/** Upgraded package info for the linkage table */\nexport interface UpgradeInfo {\n\t/** ID of the upgraded packages */\n\tupgraded_id: string;\n\t/** Version of the upgraded package */\n\tupgraded_version: string;\n}\nexport interface ValidatorApy {\n\taddress: string;\n\tapy: number;\n}\nexport interface ValidatorsApy {\n\tapys: ValidatorApy[];\n\tepoch: string;\n}\n/** An zk login authenticator with all the necessary fields. */\nexport interface ZkLoginAuthenticator {\n\tinputs: ZkLoginInputs;\n\tmaxEpoch: string;\n\tuserSignature: Signature;\n}\n/** All inputs required for the zk login proof verification and other public inputs. */\nexport interface ZkLoginInputs {\n\taddressSeed: string;\n\theaderBase64: string;\n\tissBase64Details: Claim;\n\tproofPoints: ZkLoginProof;\n}\n/** The struct for zk login proof. */\nexport interface ZkLoginProof {\n\ta: string[];\n\tb: string[][];\n\tc: string[];\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * ######################################\n * ### DO NOT EDIT THIS FILE DIRECTLY ###\n * ######################################\n *\n * This file is generated from:\n * /crates/sui-open-rpc/spec/openrpc.json\n */\n\nexport interface Balance {\n\tcoinObjectCount: number;\n\tcoinType: string;\n\tlockedBalance: {\n\t\t[key: string]: string;\n\t};\n\ttotalBalance: string;\n}\nexport interface BalanceChange {\n\t/**\n\t * The amount indicate the balance value changes, negative amount means spending coin value and\n\t * positive means receiving coin value.\n\t */\n\tamount: string;\n\tcoinType: string;\n\t/** Owner of the balance change */\n\towner: ObjectOwner;\n}\nexport interface Checkpoint {\n\t/** Commitments to checkpoint state */\n\tcheckpointCommitments: CheckpointCommitment[];\n\t/** Checkpoint digest */\n\tdigest: string;\n\t/** Present only on the final checkpoint of the epoch. */\n\tendOfEpochData?: EndOfEpochData | null;\n\t/** Checkpoint's epoch ID */\n\tepoch: string;\n\t/**\n\t * The running total gas costs of all transactions included in the current epoch so far until this\n\t * checkpoint.\n\t */\n\tepochRollingGasCostSummary: GasCostSummary;\n\t/** Total number of transactions committed since genesis, including those in this checkpoint. */\n\tnetworkTotalTransactions: string;\n\t/** Digest of the previous checkpoint */\n\tpreviousDigest?: string | null;\n\t/** Checkpoint sequence number */\n\tsequenceNumber: string;\n\t/**\n\t * Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are\n\t * monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they\n\t * originate from the same underlining consensus commit\n\t */\n\ttimestampMs: string;\n\t/** Transaction digests */\n\ttransactions: string[];\n\t/** Validator Signature */\n\tvalidatorSignature: string;\n}\nexport type CheckpointCommitment = {\n\tECMHLiveObjectSetDigest: ECMHLiveObjectSetDigest;\n};\nexport type CheckpointId = string | string;\n/** A claim consists of value and index_mod_4. */\nexport interface Claim {\n\tindexMod4: number;\n\tvalue: string;\n}\nexport interface CoinStruct {\n\tbalance: string;\n\tcoinObjectId: string;\n\tcoinType: string;\n\tdigest: string;\n\tpreviousTransaction: string;\n\tversion: string;\n}\n/** RPC representation of the [Committee] type. */\nexport interface CommitteeInfo {\n\tepoch: string;\n\tvalidators: [string, string][];\n}\n/** Unlike [enum Signature], [enum CompressedSignature] does not contain public key. */\nexport type CompressedSignature =\n\t| {\n\t\t\tEd25519: string;\n\t }\n\t| {\n\t\t\tSecp256k1: string;\n\t }\n\t| {\n\t\t\tSecp256r1: string;\n\t }\n\t| {\n\t\t\tZkLogin: string;\n\t };\n/** Uses an enum to allow for future expansion of the ConsensusDeterminedVersionAssignments. */\nexport type ConsensusDeterminedVersionAssignments = {\n\tCancelledTransactions: [string, [string, string][]][];\n};\nexport type SuiParsedData =\n\t| {\n\t\t\tdataType: 'moveObject';\n\t\t\tfields: MoveStruct;\n\t\t\thasPublicTransfer: boolean;\n\t\t\ttype: string;\n\t }\n\t| {\n\t\t\tdataType: 'package';\n\t\t\tdisassembled: {\n\t\t\t\t[key: string]: unknown;\n\t\t\t};\n\t };\nexport interface DelegatedStake {\n\tstakes: StakeObject[];\n\t/** Staking pool object id. */\n\tstakingPool: string;\n\t/** Validator's Address. */\n\tvalidatorAddress: string;\n}\n/** Additional rguments supplied to dev inspect beyond what is allowed in today's API. */\nexport interface DevInspectArgs {\n\t/** The gas budget for the transaction. */\n\tgasBudget?: string | null;\n\t/** The gas objects used to pay for the transaction. */\n\tgasObjects?: [string, string, string][] | null;\n\t/** The sponsor of the gas for the transaction, might be different from the sender. */\n\tgasSponsor?: string | null;\n\t/** Whether to return the raw transaction data and effects. */\n\tshowRawTxnDataAndEffects?: boolean | null;\n\t/** Whether to skip transaction checks for the transaction. */\n\tskipChecks?: boolean | null;\n}\n/** The response from processing a dev inspect transaction */\nexport interface DevInspectResults {\n\t/**\n\t * Summary of effects that likely would be generated if the transaction is actually run. Note however,\n\t * that not all dev-inspect transactions are actually usable as transactions so it might not be\n\t * possible actually generate these effects from a normal transaction.\n\t */\n\teffects: TransactionEffects;\n\t/** Execution error from executing the transactions */\n\terror?: string | null;\n\t/** Events that likely would be generated if the transaction is actually run. */\n\tevents: SuiEvent[];\n\t/** The raw effects of the transaction that was dev inspected. */\n\trawEffects?: number[];\n\t/** The raw transaction data that was dev inspected. */\n\trawTxnData?: number[];\n\t/** Execution results (including return values) from executing the transactions */\n\tresults?: SuiExecutionResult[] | null;\n}\nexport interface DisplayFieldsResponse {\n\tdata?: {\n\t\t[key: string]: string;\n\t} | null;\n\terror?: ObjectResponseError | null;\n}\nexport interface DryRunTransactionBlockResponse {\n\tbalanceChanges: BalanceChange[];\n\teffects: TransactionEffects;\n\tevents: SuiEvent[];\n\tinput: TransactionBlockData;\n\tobjectChanges: SuiObjectChange[];\n}\nexport interface DynamicFieldInfo {\n\tbcsName: string;\n\tdigest: string;\n\tname: DynamicFieldName;\n\tobjectId: string;\n\tobjectType: string;\n\ttype: DynamicFieldType;\n\tversion: string;\n}\nexport interface DynamicFieldName {\n\ttype: string;\n\tvalue: unknown;\n}\nexport type DynamicFieldType = 'DynamicField' | 'DynamicObject';\n/** The Sha256 digest of an EllipticCurveMultisetHash committing to the live object set. */\nexport interface ECMHLiveObjectSetDigest {\n\tdigest: number[];\n}\nexport interface EndOfEpochData {\n\t/** Commitments to epoch specific state (e.g. live object set) */\n\tepochCommitments: CheckpointCommitment[];\n\t/**\n\t * next_epoch_committee is `Some` if and only if the current checkpoint is the last checkpoint of an\n\t * epoch. Therefore next_epoch_committee can be used to pick the last checkpoint of an epoch, which is\n\t * often useful to get epoch level summary stats like total gas cost of an epoch, or the total number\n\t * of transactions from genesis to the end of an epoch. The committee is stored as a vector of\n\t * validator pub key and stake pairs. The vector should be sorted based on the Committee data\n\t * structure.\n\t */\n\tnextEpochCommittee: [string, string][];\n\t/**\n\t * The protocol version that is in effect during the epoch that starts immediately after this\n\t * checkpoint.\n\t */\n\tnextEpochProtocolVersion: string;\n}\nexport interface SuiEvent {\n\t/** Base 58 encoded bcs bytes of the move event */\n\tbcs: string;\n\t/**\n\t * Sequential event ID, ie (transaction seq number, event seq number). 1) Serves as a unique event ID\n\t * for each fullnode 2) Also serves to sequence events for the purposes of pagination and querying. A\n\t * higher id is an event seen later by that fullnode. This ID is the \"cursor\" for event querying.\n\t */\n\tid: EventId;\n\t/** Move package where this event was emitted. */\n\tpackageId: string;\n\t/** Parsed json value of the event */\n\tparsedJson: unknown;\n\t/** Sender's Sui address. */\n\tsender: string;\n\t/** UTC timestamp in milliseconds since epoch (1/1/1970) */\n\ttimestampMs?: string | null;\n\t/** Move module where this event was emitted. */\n\ttransactionModule: string;\n\t/** Move event type. */\n\ttype: string;\n}\nexport type SuiEventFilter =\n\t/** Query by sender address. */\n\t| {\n\t\t\tSender: string;\n\t } /** Return events emitted by the given transaction. */\n\t| {\n\t\t\tTransaction: string;\n\t } /** Return events emitted in a specified Package. */\n\t| {\n\t\t\tPackage: string;\n\t } /**\n\t * Return events emitted in a specified Move module. If the event is defined in Module A but emitted in\n\t * a tx with Module B, query `MoveModule` by module B returns the event. Query `MoveEventModule` by\n\t * module A returns the event too.\n\t */\n\t| {\n\t\t\tMoveModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /**\n\t * Return events with the given Move event struct name (struct tag). For example, if the event is\n\t * defined in `0xabcd::MyModule`, and named `Foo`, then the struct tag is `0xabcd::MyModule::Foo`.\n\t */\n\t| {\n\t\t\tMoveEventType: string;\n\t } /**\n\t * Return events with the given Move module name where the event struct is defined. If the event is\n\t * defined in Module A but emitted in a tx with Module B, query `MoveEventModule` by module A returns\n\t * the event. Query `MoveModule` by module B returns the event too.\n\t */\n\t| {\n\t\t\tMoveEventModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tMoveEventField: {\n\t\t\t\tpath: string;\n\t\t\t\tvalue: unknown;\n\t\t\t};\n\t } /** Return events emitted in [start_time, end_time] interval */\n\t| {\n\t\t\tTimeRange: {\n\t\t\t\t/** right endpoint of time interval, milliseconds since epoch, exclusive */\n\t\t\t\tendTime: string;\n\t\t\t\t/** left endpoint of time interval, milliseconds since epoch, inclusive */\n\t\t\t\tstartTime: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\tAll: SuiEventFilter[];\n\t }\n\t| {\n\t\t\tAny: SuiEventFilter[];\n\t }\n\t| {\n\t\t\tAnd: [SuiEventFilter, SuiEventFilter];\n\t }\n\t| {\n\t\t\tOr: [SuiEventFilter, SuiEventFilter];\n\t };\n/**\n * Unique ID of a Sui Event, the ID is a combination of transaction digest and event seq number.\n */\nexport interface EventId {\n\teventSeq: string;\n\ttxDigest: string;\n}\nexport type ExecuteTransactionRequestType = 'WaitForEffectsCert' | 'WaitForLocalExecution';\nexport type ExecutionStatus = {\n\tstatus: 'success' | 'failure';\n\terror?: string;\n};\n/**\n * Summary of the charges in a transaction. Storage is charged independently of computation. There are\n * 3 parts to the storage charges: `storage_cost`: it is the charge of storage at the time the\n * transaction is executed. The cost of storage is the number of bytes of the objects being mutated\n * multiplied by a variable storage cost per byte `storage_rebate`: this is the amount a user gets back\n * when manipulating an object. The `storage_rebate` is the `storage_cost` for an object minus fees.\n * `non_refundable_storage_fee`: not all the value of the object storage cost is given back to user and\n * there is a small fraction that is kept by the system. This value tracks that charge.\n *\n * When looking at a gas cost summary the amount charged to the user is\n * `computation_cost + storage_cost - storage_rebate` and that is the amount that is deducted from the\n * gas coins. `non_refundable_storage_fee` is collected from the objects being mutated/deleted and it\n * is tracked by the system in storage funds.\n *\n * Objects deleted, including the older versions of objects mutated, have the storage field on the\n * objects added up to a pool of \"potential rebate\". This rebate then is reduced by the \"nonrefundable\n * rate\" such that:\n * `potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_fee`\n */\nexport interface GasCostSummary {\n\t/** Cost of computation/execution */\n\tcomputationCost: string;\n\t/** The fee for the rebate. The portion of the storage rebate kept by the system. */\n\tnonRefundableStorageFee: string;\n\t/** Storage cost, it's the sum of all storage cost for all objects created or mutated. */\n\tstorageCost: string;\n\t/**\n\t * The amount of storage cost refunded to the user for all objects deleted or mutated in the\n\t * transaction.\n\t */\n\tstorageRebate: string;\n}\nexport interface SuiGasData {\n\tbudget: string;\n\towner: string;\n\tpayment: SuiObjectRef[];\n\tprice: string;\n}\nexport interface GetPastObjectRequest {\n\t/** the ID of the queried object */\n\tobjectId: string;\n\t/** the version of the queried object. */\n\tversion: string;\n}\nexport type InputObjectKind =\n\t| {\n\t\t\tMovePackage: string;\n\t }\n\t| {\n\t\t\tImmOrOwnedMoveObject: SuiObjectRef;\n\t }\n\t| {\n\t\t\tSharedMoveObject: {\n\t\t\t\tid: string;\n\t\t\t\tinitial_shared_version: string;\n\t\t\t\tmutable?: boolean;\n\t\t\t};\n\t };\nexport interface MoveCallParams {\n\targuments: unknown[];\n\tfunction: string;\n\tmodule: string;\n\tpackageObjectId: string;\n\ttypeArguments?: string[];\n}\nexport type SuiMoveFunctionArgType =\n\t| 'Pure'\n\t| {\n\t\t\tObject: ObjectValueKind;\n\t };\nexport type MoveStruct =\n\t| MoveValue[]\n\t| {\n\t\t\tfields: {\n\t\t\t\t[key: string]: MoveValue;\n\t\t\t};\n\t\t\ttype: string;\n\t }\n\t| {\n\t\t\t[key: string]: MoveValue;\n\t };\nexport type MoveValue =\n\t| number\n\t| boolean\n\t| string\n\t| MoveValue[]\n\t| string\n\t| {\n\t\t\tid: string;\n\t }\n\t| MoveStruct\n\t| null\n\t| MoveVariant;\nexport interface MoveVariant {\n\tfields: {\n\t\t[key: string]: MoveValue;\n\t};\n\ttype: string;\n\tvariant: string;\n}\n/** The struct that contains signatures and public keys necessary for authenticating a MultiSig. */\nexport interface MultiSig {\n\t/** A bitmap that indicates the position of which public key the signature should be authenticated with. */\n\tbitmap: number;\n\t/**\n\t * The public key encoded with each public key with its signature scheme used along with the\n\t * corresponding weight.\n\t */\n\tmultisig_pk: MultiSigPublicKey;\n\t/** The plain signature encoded with signature scheme. */\n\tsigs: CompressedSignature[];\n}\n/**\n * Deprecated, use [struct MultiSig] instead. The struct that contains signatures and public keys necessary\n * for authenticating a MultiSigLegacy.\n */\nexport interface MultiSigLegacy {\n\t/** A bitmap that indicates the position of which public key the signature should be authenticated with. */\n\tbitmap: string;\n\t/**\n\t * The public key encoded with each public key with its signature scheme used along with the\n\t * corresponding weight.\n\t */\n\tmultisig_pk: MultiSigPublicKeyLegacy;\n\t/** The plain signature encoded with signature scheme. */\n\tsigs: CompressedSignature[];\n}\n/** The struct that contains the public key used for authenticating a MultiSig. */\nexport interface MultiSigPublicKey {\n\t/** A list of public key and its corresponding weight. */\n\tpk_map: [PublicKey, number][];\n\t/**\n\t * If the total weight of the public keys corresponding to verified signatures is larger than\n\t * threshold, the MultiSig is verified.\n\t */\n\tthreshold: number;\n}\n/**\n * Deprecated, use [struct MultiSigPublicKey] instead. The struct that contains the public key used for\n * authenticating a MultiSig.\n */\nexport interface MultiSigPublicKeyLegacy {\n\t/** A list of public key and its corresponding weight. */\n\tpk_map: [PublicKey, number][];\n\t/**\n\t * If the total weight of the public keys corresponding to verified signatures is larger than\n\t * threshold, the MultiSig is verified.\n\t */\n\tthreshold: number;\n}\n/**\n * ObjectChange are derived from the object mutations in the TransactionEffect to provide richer object\n * information.\n */\nexport type SuiObjectChange =\n\t/** Module published */\n\t| {\n\t\t\tdigest: string;\n\t\t\tmodules: string[];\n\t\t\tpackageId: string;\n\t\t\ttype: 'published';\n\t\t\tversion: string;\n\t } /** Transfer objects to new address / wrap in another object */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\trecipient: ObjectOwner;\n\t\t\tsender: string;\n\t\t\ttype: 'transferred';\n\t\t\tversion: string;\n\t } /** Object mutated. */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\towner: ObjectOwner;\n\t\t\tpreviousVersion: string;\n\t\t\tsender: string;\n\t\t\ttype: 'mutated';\n\t\t\tversion: string;\n\t } /** Delete object */\n\t| {\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\tsender: string;\n\t\t\ttype: 'deleted';\n\t\t\tversion: string;\n\t } /** Wrapped object */\n\t| {\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\tsender: string;\n\t\t\ttype: 'wrapped';\n\t\t\tversion: string;\n\t } /** New object creation */\n\t| {\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: string;\n\t\t\towner: ObjectOwner;\n\t\t\tsender: string;\n\t\t\ttype: 'created';\n\t\t\tversion: string;\n\t };\nexport interface SuiObjectData {\n\t/**\n\t * Move object content or package content in BCS, default to be None unless\n\t * SuiObjectDataOptions.showBcs is set to true\n\t */\n\tbcs?: RawData | null;\n\t/**\n\t * Move object content or package content, default to be None unless SuiObjectDataOptions.showContent\n\t * is set to true\n\t */\n\tcontent?: SuiParsedData | null;\n\t/** Base64 string representing the object digest */\n\tdigest: string;\n\t/**\n\t * The Display metadata for frontend UI rendering, default to be None unless\n\t * SuiObjectDataOptions.showContent is set to true This can also be None if the struct type does not\n\t * have Display defined See more details in <https://forums.sui.io/t/nft-object-display-proposal/4872>\n\t */\n\tdisplay?: DisplayFieldsResponse | null;\n\tobjectId: string;\n\t/** The owner of this object. Default to be None unless SuiObjectDataOptions.showOwner is set to true */\n\towner?: ObjectOwner | null;\n\t/**\n\t * The digest of the transaction that created or last mutated this object. Default to be None unless\n\t * SuiObjectDataOptions.showPreviousTransaction is set to true\n\t */\n\tpreviousTransaction?: string | null;\n\t/**\n\t * The amount of SUI we would rebate if this object gets deleted. This number is re-calculated each\n\t * time the object is mutated based on the present storage gas price.\n\t */\n\tstorageRebate?: string | null;\n\t/** The type of the object. Default to be None unless SuiObjectDataOptions.showType is set to true */\n\ttype?: string | null;\n\t/** Object version. */\n\tversion: string;\n}\nexport interface SuiObjectDataOptions {\n\t/** Whether to show the content in BCS format. Default to be False */\n\tshowBcs?: boolean;\n\t/**\n\t * Whether to show the content(i.e., package content or Move struct content) of the object. Default to\n\t * be False\n\t */\n\tshowContent?: boolean;\n\t/** Whether to show the Display metadata of the object for frontend rendering. Default to be False */\n\tshowDisplay?: boolean;\n\t/** Whether to show the owner of the object. Default to be False */\n\tshowOwner?: boolean;\n\t/** Whether to show the previous transaction digest of the object. Default to be False */\n\tshowPreviousTransaction?: boolean;\n\t/** Whether to show the storage rebate of the object. Default to be False */\n\tshowStorageRebate?: boolean;\n\t/** Whether to show the type of the object. Default to be False */\n\tshowType?: boolean;\n}\nexport type ObjectRead =\n\t/** The object exists and is found with this version */\n\t| {\n\t\t\tdetails: SuiObjectData;\n\t\t\tstatus: 'VersionFound';\n\t } /** The object does not exist */\n\t| {\n\t\t\tdetails: string;\n\t\t\tstatus: 'ObjectNotExists';\n\t } /** The object is found to be deleted with this version */\n\t| {\n\t\t\tdetails: SuiObjectRef;\n\t\t\tstatus: 'ObjectDeleted';\n\t } /** The object exists but not found with this version */\n\t| {\n\t\t\tdetails: [string, string];\n\t\t\tstatus: 'VersionNotFound';\n\t } /** The asked object version is higher than the latest */\n\t| {\n\t\t\tdetails: {\n\t\t\t\tasked_version: string;\n\t\t\t\tlatest_version: string;\n\t\t\t\tobject_id: string;\n\t\t\t};\n\t\t\tstatus: 'VersionTooHigh';\n\t };\nexport interface SuiObjectRef {\n\t/** Base64 string representing the object digest */\n\tdigest: string;\n\t/** Hex code as string representing the object id */\n\tobjectId: string;\n\t/** Object version. */\n\tversion: string;\n}\nexport type ObjectResponseError =\n\t| {\n\t\t\tcode: 'notExists';\n\t\t\tobject_id: string;\n\t }\n\t| {\n\t\t\tcode: 'dynamicFieldNotFound';\n\t\t\tparent_object_id: string;\n\t }\n\t| {\n\t\t\tcode: 'deleted';\n\t\t\t/** Base64 string representing the object digest */\n\t\t\tdigest: string;\n\t\t\tobject_id: string;\n\t\t\t/** Object version. */\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\tcode: 'unknown';\n\t }\n\t| {\n\t\t\tcode: 'displayError';\n\t\t\terror: string;\n\t };\nexport interface SuiObjectResponseQuery {\n\t/** If None, no filter will be applied */\n\tfilter?: SuiObjectDataFilter | null;\n\t/** config which fields to include in the response, by default only digest is included */\n\toptions?: SuiObjectDataOptions | null;\n}\nexport type ObjectValueKind = 'ByImmutableReference' | 'ByMutableReference' | 'ByValue';\nexport interface OwnedObjectRef {\n\towner: ObjectOwner;\n\treference: SuiObjectRef;\n}\nexport type ObjectOwner =\n\t/** Object is exclusively owned by a single address, and is mutable. */\n\t| {\n\t\t\tAddressOwner: string;\n\t } /**\n\t * Object is exclusively owned by a single object, and is mutable. The object ID is converted to\n\t * SuiAddress as SuiAddress is universal.\n\t */\n\t| {\n\t\t\tObjectOwner: string;\n\t } /** Object is shared, can be used by any address, and is mutable. */\n\t| {\n\t\t\tShared: {\n\t\t\t\t/** The version at which the object became shared */\n\t\t\t\tinitial_shared_version: string;\n\t\t\t};\n\t }\n\t| 'Immutable';\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedCheckpoints {\n\tdata: Checkpoint[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedCoins {\n\tdata: CoinStruct[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedDynamicFieldInfos {\n\tdata: DynamicFieldInfo[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedEvents {\n\tdata: SuiEvent[];\n\thasNextPage: boolean;\n\tnextCursor?: EventId | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedStrings {\n\tdata: string[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedObjectsResponse {\n\tdata: SuiObjectResponse[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the\n * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first\n * item.\n */\nexport interface PaginatedTransactionResponse {\n\tdata: SuiTransactionBlockResponse[];\n\thasNextPage: boolean;\n\tnextCursor?: string | null;\n}\n/**\n * An passkey authenticator with parsed fields. See field defition below. Can be initialized from\n * [struct RawPasskeyAuthenticator].\n */\nexport interface PasskeyAuthenticator {\n\t/**\n\t * `authenticatorData` is a bytearray that encodes\n\t * [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) structure returned\n\t * by the authenticator attestation response as is.\n\t */\n\tauthenticator_data: number[];\n\t/**\n\t * `clientDataJSON` contains a JSON-compatible UTF-8 encoded string of the client data which is passed\n\t * to the authenticator by the client during the authentication request (see\n\t * [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata))\n\t */\n\tclient_data_json: string;\n}\nexport interface ProtocolConfig {\n\tattributes: {\n\t\t[key: string]: ProtocolConfigValue | null;\n\t};\n\tfeatureFlags: {\n\t\t[key: string]: boolean;\n\t};\n\tmaxSupportedProtocolVersion: string;\n\tminSupportedProtocolVersion: string;\n\tprotocolVersion: string;\n}\nexport type ProtocolConfigValue =\n\t| {\n\t\t\tu16: string;\n\t }\n\t| {\n\t\t\tu32: string;\n\t }\n\t| {\n\t\t\tu64: string;\n\t }\n\t| {\n\t\t\tf64: string;\n\t }\n\t| {\n\t\t\tbool: string;\n\t };\nexport type PublicKey =\n\t| {\n\t\t\tEd25519: string;\n\t }\n\t| {\n\t\t\tSecp256k1: string;\n\t }\n\t| {\n\t\t\tSecp256r1: string;\n\t }\n\t| {\n\t\t\tZkLogin: string;\n\t }\n\t| {\n\t\t\tPasskey: string;\n\t };\nexport type RPCTransactionRequestParams =\n\t| {\n\t\t\ttransferObjectRequestParams: TransferObjectParams;\n\t }\n\t| {\n\t\t\tmoveCallRequestParams: MoveCallParams;\n\t };\nexport type RawData =\n\t| {\n\t\t\tbcsBytes: string;\n\t\t\tdataType: 'moveObject';\n\t\t\thasPublicTransfer: boolean;\n\t\t\ttype: string;\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\tdataType: 'package';\n\t\t\tid: string;\n\t\t\tlinkageTable: {\n\t\t\t\t[key: string]: UpgradeInfo;\n\t\t\t};\n\t\t\tmoduleMap: {\n\t\t\t\t[key: string]: string;\n\t\t\t};\n\t\t\ttypeOriginTable: TypeOrigin[];\n\t\t\tversion: string;\n\t };\nexport type Signature =\n\t| {\n\t\t\tEd25519SuiSignature: string;\n\t }\n\t| {\n\t\t\tSecp256k1SuiSignature: string;\n\t }\n\t| {\n\t\t\tSecp256r1SuiSignature: string;\n\t };\nexport type StakeObject =\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\tstatus: 'Pending';\n\t }\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\testimatedReward: string;\n\t\t\tstatus: 'Active';\n\t }\n\t| {\n\t\t\tprincipal: string;\n\t\t\tstakeActiveEpoch: string;\n\t\t\tstakeRequestEpoch: string;\n\t\t\t/** ID of the StakedSui receipt object. */\n\t\t\tstakedSuiId: string;\n\t\t\tstatus: 'Unstaked';\n\t };\nexport interface SuiActiveJwk {\n\tepoch: string;\n\tjwk: SuiJWK;\n\tjwk_id: SuiJwkId;\n}\n/** An argument to a transaction in a programmable transaction block */\nexport type SuiArgument =\n\t| 'GasCoin' /** One of the input objects or primitive values (from `ProgrammableTransactionBlock` inputs) */\n\t| {\n\t\t\tInput: number;\n\t } /** The result of another transaction (from `ProgrammableTransactionBlock` transactions) */\n\t| {\n\t\t\tResult: number;\n\t } /**\n\t * Like a `Result` but it accesses a nested result. Currently, the only usage of this is to access a\n\t * value from a Move call with multiple return values.\n\t */\n\t| {\n\t\t\tNestedResult: [number, number];\n\t };\nexport interface SuiAuthenticatorStateExpire {\n\tmin_epoch: string;\n}\nexport type SuiCallArg =\n\t| {\n\t\t\ttype: 'object';\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'immOrOwnedObject';\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\ttype: 'object';\n\t\t\tinitialSharedVersion: string;\n\t\t\tmutable: boolean;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'sharedObject';\n\t }\n\t| {\n\t\t\ttype: 'object';\n\t\t\tdigest: string;\n\t\t\tobjectId: string;\n\t\t\tobjectType: 'receiving';\n\t\t\tversion: string;\n\t }\n\t| {\n\t\t\ttype: 'pure';\n\t\t\tvalue: unknown;\n\t\t\tvalueType?: string | null;\n\t };\nexport interface SuiChangeEpoch {\n\tcomputation_charge: string;\n\tepoch: string;\n\tepoch_start_timestamp_ms: string;\n\tstorage_charge: string;\n\tstorage_rebate: string;\n}\nexport interface CoinMetadata {\n\t/** Number of decimal places the coin uses. */\n\tdecimals: number;\n\t/** Description of the token */\n\tdescription: string;\n\t/** URL for the token logo */\n\ticonUrl?: string | null;\n\t/** Object id for the CoinMetadata object */\n\tid?: string | null;\n\t/** Name for the token */\n\tname: string;\n\t/** Symbol for the token */\n\tsymbol: string;\n}\nexport type SuiEndOfEpochTransactionKind =\n\t| 'AuthenticatorStateCreate'\n\t| 'RandomnessStateCreate'\n\t| 'CoinDenyListStateCreate'\n\t| {\n\t\t\tChangeEpoch: SuiChangeEpoch;\n\t }\n\t| {\n\t\t\tAuthenticatorStateExpire: SuiAuthenticatorStateExpire;\n\t }\n\t| {\n\t\t\tBridgeStateCreate: string;\n\t }\n\t| {\n\t\t\tBridgeCommitteeUpdate: string;\n\t };\nexport interface SuiExecutionResult {\n\t/** The value of any arguments that were mutably borrowed. Non-mut borrowed values are not included */\n\tmutableReferenceOutputs?: [SuiArgument, number[], string][];\n\t/** The return values from the transaction */\n\treturnValues?: [number[], string][];\n}\nexport interface SuiJWK {\n\talg: string;\n\te: string;\n\tkty: string;\n\tn: string;\n}\nexport interface SuiJwkId {\n\tiss: string;\n\tkid: string;\n}\nexport type SuiMoveAbility = 'Copy' | 'Drop' | 'Store' | 'Key';\nexport interface SuiMoveAbilitySet {\n\tabilities: SuiMoveAbility[];\n}\nexport interface SuiMoveModuleId {\n\taddress: string;\n\tname: string;\n}\nexport interface SuiMoveNormalizedField {\n\tname: string;\n\ttype: SuiMoveNormalizedType;\n}\nexport interface SuiMoveNormalizedFunction {\n\tisEntry: boolean;\n\tparameters: SuiMoveNormalizedType[];\n\treturn: SuiMoveNormalizedType[];\n\ttypeParameters: SuiMoveAbilitySet[];\n\tvisibility: SuiMoveVisibility;\n}\nexport interface SuiMoveNormalizedModule {\n\taddress: string;\n\texposedFunctions: {\n\t\t[key: string]: SuiMoveNormalizedFunction;\n\t};\n\tfileFormatVersion: number;\n\tfriends: SuiMoveModuleId[];\n\tname: string;\n\tstructs: {\n\t\t[key: string]: SuiMoveNormalizedStruct;\n\t};\n}\nexport interface SuiMoveNormalizedStruct {\n\tabilities: SuiMoveAbilitySet;\n\tfields: SuiMoveNormalizedField[];\n\ttypeParameters: SuiMoveStructTypeParameter[];\n}\nexport type SuiMoveNormalizedType =\n\t| 'Bool'\n\t| 'U8'\n\t| 'U16'\n\t| 'U32'\n\t| 'U64'\n\t| 'U128'\n\t| 'U256'\n\t| 'Address'\n\t| 'Signer'\n\t| {\n\t\t\tStruct: {\n\t\t\t\taddress: string;\n\t\t\t\tmodule: string;\n\t\t\t\tname: string;\n\t\t\t\ttypeArguments: SuiMoveNormalizedType[];\n\t\t\t};\n\t }\n\t| {\n\t\t\tVector: SuiMoveNormalizedType;\n\t }\n\t| {\n\t\t\tTypeParameter: number;\n\t }\n\t| {\n\t\t\tReference: SuiMoveNormalizedType;\n\t }\n\t| {\n\t\t\tMutableReference: SuiMoveNormalizedType;\n\t };\nexport interface SuiMoveStructTypeParameter {\n\tconstraints: SuiMoveAbilitySet;\n\tisPhantom: boolean;\n}\nexport type SuiMoveVisibility = 'Private' | 'Public' | 'Friend';\nexport type SuiObjectDataFilter =\n\t| {\n\t\t\tMatchAll: SuiObjectDataFilter[];\n\t }\n\t| {\n\t\t\tMatchAny: SuiObjectDataFilter[];\n\t }\n\t| {\n\t\t\tMatchNone: SuiObjectDataFilter[];\n\t } /** Query by type a specified Package. */\n\t| {\n\t\t\tPackage: string;\n\t } /** Query by type a specified Move module. */\n\t| {\n\t\t\tMoveModule: {\n\t\t\t\t/** the module name */\n\t\t\t\tmodule: string;\n\t\t\t\t/** the Move package ID */\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /** Query by type */\n\t| {\n\t\t\tStructType: string;\n\t }\n\t| {\n\t\t\tAddressOwner: string;\n\t }\n\t| {\n\t\t\tObjectOwner: string;\n\t }\n\t| {\n\t\t\tObjectId: string;\n\t }\n\t| {\n\t\t\tObjectIds: string[];\n\t }\n\t| {\n\t\t\tVersion: string;\n\t };\nexport interface SuiObjectResponse {\n\tdata?: SuiObjectData | null;\n\terror?: ObjectResponseError | null;\n}\n/**\n * The transaction for calling a Move function, either an entry function or a public function (which\n * cannot return references).\n */\nexport interface MoveCallSuiTransaction {\n\t/** The arguments to the function. */\n\targuments?: SuiArgument[];\n\t/** The function to be called. */\n\tfunction: string;\n\t/** The specific module in the package containing the function. */\n\tmodule: string;\n\t/** The package containing the module and function. */\n\tpackage: string;\n\t/** The type arguments to the function. */\n\ttype_arguments?: string[];\n}\n/**\n * This is the JSON-RPC type for the SUI system state object. It flattens all fields to make them\n * top-level fields such that it as minimum dependencies to the internal data structures of the SUI\n * system state type.\n */\nexport interface SuiSystemStateSummary {\n\t/** The list of active validators in the current epoch. */\n\tactiveValidators: SuiValidatorSummary[];\n\t/** Map storing the number of epochs for which each validator has been below the low stake threshold. */\n\tatRiskValidators: [string, string][];\n\t/** The current epoch ID, starting from 0. */\n\tepoch: string;\n\t/** The duration of an epoch, in milliseconds. */\n\tepochDurationMs: string;\n\t/** Unix timestamp of the current epoch start */\n\tepochStartTimestampMs: string;\n\t/**\n\t * ID of the object that maps from a staking pool ID to the inactive validator that has that pool as\n\t * its staking pool.\n\t */\n\tinactivePoolsId: string;\n\t/** Number of inactive staking pools. */\n\tinactivePoolsSize: string;\n\t/**\n\t * Maximum number of active validators at any moment. We do not allow the number of validators in any\n\t * epoch to go above this.\n\t */\n\tmaxValidatorCount: string;\n\t/** Lower-bound on the amount of stake required to become a validator. */\n\tminValidatorJoiningStake: string;\n\t/** ID of the object that contains the list of new validators that will join at the end of the epoch. */\n\tpendingActiveValidatorsId: string;\n\t/** Number of new validators that will join at the end of the epoch. */\n\tpendingActiveValidatorsSize: string;\n\t/** Removal requests from the validators. Each element is an index pointing to `active_validators`. */\n\tpendingRemovals: string[];\n\t/** The current protocol version, starting from 1. */\n\tprotocolVersion: string;\n\t/** The reference gas price for the current epoch. */\n\treferenceGasPrice: string;\n\t/**\n\t * Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set\n\t * whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can\n\t * be reset once we are able to successfully execute advance_epoch.\n\t */\n\tsafeMode: boolean;\n\t/** Amount of computation rewards accumulated (and not yet distributed) during safe mode. */\n\tsafeModeComputationRewards: string;\n\t/** Amount of non-refundable storage fee accumulated during safe mode. */\n\tsafeModeNonRefundableStorageFee: string;\n\t/** Amount of storage rebates accumulated (and not yet burned) during safe mode. */\n\tsafeModeStorageRebates: string;\n\t/** Amount of storage rewards accumulated (and not yet distributed) during safe mode. */\n\tsafeModeStorageRewards: string;\n\t/** Balance of SUI set aside for stake subsidies that will be drawn down over time. */\n\tstakeSubsidyBalance: string;\n\t/** The amount of stake subsidy to be drawn down per epoch. This amount decays and decreases over time. */\n\tstakeSubsidyCurrentDistributionAmount: string;\n\t/**\n\t * The rate at which the distribution amount decays at the end of each period. Expressed in basis\n\t * points.\n\t */\n\tstakeSubsidyDecreaseRate: number;\n\t/**\n\t * This counter may be different from the current epoch number if in some epochs we decide to skip the\n\t * subsidy.\n\t */\n\tstakeSubsidyDistributionCounter: string;\n\t/** Number of distributions to occur before the distribution amount decays. */\n\tstakeSubsidyPeriodLength: string;\n\t/** The starting epoch in which stake subsidies start being paid out */\n\tstakeSubsidyStartEpoch: string;\n\t/** ID of the object that maps from staking pool's ID to the sui address of a validator. */\n\tstakingPoolMappingsId: string;\n\t/** Number of staking pool mappings. */\n\tstakingPoolMappingsSize: string;\n\t/**\n\t * The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable\n\t * storage rebates and any leftover staking rewards.\n\t */\n\tstorageFundNonRefundableBalance: string;\n\t/** The storage rebates of all the objects on-chain stored in the storage fund. */\n\tstorageFundTotalObjectStorageRebates: string;\n\t/** The current version of the system state data structure type. */\n\tsystemStateVersion: string;\n\t/** Total amount of stake from all active validators at the beginning of the epoch. */\n\ttotalStake: string;\n\t/**\n\t * ID of the object that stores preactive validators, mapping their addresses to their `Validator`\n\t * structs.\n\t */\n\tvalidatorCandidatesId: string;\n\t/** Number of preactive validators. */\n\tvalidatorCandidatesSize: string;\n\t/**\n\t * A validator can have stake below `validator_low_stake_threshold` for this many epochs before being\n\t * kicked out.\n\t */\n\tvalidatorLowStakeGracePeriod: string;\n\t/**\n\t * Validators with stake amount below `validator_low_stake_threshold` are considered to have low stake\n\t * and will be escorted out of the validator set after being below this threshold for more than\n\t * `validator_low_stake_grace_period` number of epochs.\n\t */\n\tvalidatorLowStakeThreshold: string;\n\t/** A map storing the records of validator reporting each other. */\n\tvalidatorReportRecords: [string, string[]][];\n\t/**\n\t * Validators with stake below `validator_very_low_stake_threshold` will be removed immediately at\n\t * epoch change, no grace period.\n\t */\n\tvalidatorVeryLowStakeThreshold: string;\n}\n/** A single transaction in a programmable transaction block. */\nexport type SuiTransaction =\n\t/** A call to either an entry or a public Move function */\n\t| {\n\t\t\tMoveCall: MoveCallSuiTransaction;\n\t } /**\n\t * `(Vec<forall T:key+store. T>, address)` It sends n-objects to the specified address. These objects\n\t * must have store (public transfer) and either the previous owner must be an address or the object\n\t * must be newly created.\n\t */\n\t| {\n\t\t\tTransferObjects: [SuiArgument[], SuiArgument];\n\t } /**\n\t * `(&mut Coin<T>, Vec<u64>)` -> `Vec<Coin<T>>` It splits off some amounts into a new coins with those\n\t * amounts\n\t */\n\t| {\n\t\t\tSplitCoins: [SuiArgument, SuiArgument[]];\n\t } /** `(&mut Coin<T>, Vec<Coin<T>>)` It merges n-coins into the first coin */\n\t| {\n\t\t\tMergeCoins: [SuiArgument, SuiArgument[]];\n\t } /**\n\t * Publishes a Move package. It takes the package bytes and a list of the package's transitive\n\t * dependencies to link against on-chain.\n\t */\n\t| {\n\t\t\tPublish: string[];\n\t } /** Upgrades a Move package */\n\t| {\n\t\t\tUpgrade: [string[], string, SuiArgument];\n\t } /**\n\t * `forall T: Vec<T> -> vector<T>` Given n-values of the same type, it constructs a vector. For non\n\t * objects or an empty vector, the type tag must be specified.\n\t */\n\t| {\n\t\t\tMakeMoveVec: [string | null, SuiArgument[]];\n\t };\nexport type SuiTransactionBlockBuilderMode = 'Commit' | 'DevInspect';\n/**\n * This is the JSON-RPC type for the SUI validator. It flattens all inner structures to top-level\n * fields so that they are decoupled from the internal definitions.\n */\nexport interface SuiValidatorSummary {\n\tcommissionRate: string;\n\tdescription: string;\n\t/** ID of the exchange rate table object. */\n\texchangeRatesId: string;\n\t/** Number of exchange rates in the table. */\n\texchangeRatesSize: string;\n\tgasPrice: string;\n\timageUrl: string;\n\tname: string;\n\tnetAddress: string;\n\tnetworkPubkeyBytes: string;\n\tnextEpochCommissionRate: string;\n\tnextEpochGasPrice: string;\n\tnextEpochNetAddress?: string | null;\n\tnextEpochNetworkPubkeyBytes?: string | null;\n\tnextEpochP2pAddress?: string | null;\n\tnextEpochPrimaryAddress?: string | null;\n\tnextEpochProofOfPossession?: string | null;\n\tnextEpochProtocolPubkeyBytes?: string | null;\n\tnextEpochStake: string;\n\tnextEpochWorkerAddress?: string | null;\n\tnextEpochWorkerPubkeyBytes?: string | null;\n\toperationCapId: string;\n\tp2pAddress: string;\n\t/** Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. */\n\tpendingPoolTokenWithdraw: string;\n\t/** Pending stake amount for this epoch. */\n\tpendingStake: string;\n\t/** Pending stake withdrawn during the current epoch, emptied at epoch boundaries. */\n\tpendingTotalSuiWithdraw: string;\n\t/** Total number of pool tokens issued by the pool. */\n\tpoolTokenBalance: string;\n\tprimaryAddress: string;\n\tprojectUrl: string;\n\tproofOfPossessionBytes: string;\n\tprotocolPubkeyBytes: string;\n\t/** The epoch stake rewards will be added here at the end of each epoch. */\n\trewardsPool: string;\n\t/** The epoch at which this pool became active. */\n\tstakingPoolActivationEpoch?: string | null;\n\t/** The epoch at which this staking pool ceased to be active. `None` = {pre-active, active}, */\n\tstakingPoolDeactivationEpoch?: string | null;\n\t/** ID of the staking pool object. */\n\tstakingPoolId: string;\n\t/** The total number of SUI tokens in this pool. */\n\tstakingPoolSuiBalance: string;\n\tsuiAddress: string;\n\tvotingPower: string;\n\tworkerAddress: string;\n\tworkerPubkeyBytes: string;\n}\nexport interface CoinSupply {\n\tvalue: string;\n}\nexport interface SuiTransactionBlock {\n\tdata: TransactionBlockData;\n\ttxSignatures: string[];\n}\nexport interface TransactionBlockBytes {\n\t/** the gas objects to be used */\n\tgas: SuiObjectRef[];\n\t/** objects to be used in this transaction */\n\tinputObjects: InputObjectKind[];\n\t/** BCS serialized transaction data bytes without its type tag, as base-64 encoded string. */\n\ttxBytes: string;\n}\nexport type TransactionBlockData = {\n\tgasData: SuiGasData;\n\tmessageVersion: 'v1';\n\tsender: string;\n\ttransaction: SuiTransactionBlockKind;\n};\nexport type TransactionEffects =\n\t/** The response from processing a transaction or a certified transaction */\n\t{\n\t\t/** ObjectRef and owner of new objects created. */\n\t\tcreated?: OwnedObjectRef[];\n\t\t/** Object Refs of objects now deleted (the old refs). */\n\t\tdeleted?: SuiObjectRef[];\n\t\t/** The set of transaction digests this transaction depends on. */\n\t\tdependencies?: string[];\n\t\t/**\n\t\t * The digest of the events emitted during execution, can be None if the transaction does not emit any\n\t\t * event.\n\t\t */\n\t\teventsDigest?: string | null;\n\t\t/** The epoch when this transaction was executed. */\n\t\texecutedEpoch: string;\n\t\t/**\n\t\t * The updated gas object reference. Have a dedicated field for convenient access. It's also included\n\t\t * in mutated.\n\t\t */\n\t\tgasObject: OwnedObjectRef;\n\t\tgasUsed: GasCostSummary;\n\t\tmessageVersion: 'v1';\n\t\t/**\n\t\t * The version that every modified (mutated or deleted) object had before it was modified by this\n\t\t * transaction.\n\t\t */\n\t\tmodifiedAtVersions?: TransactionBlockEffectsModifiedAtVersions[];\n\t\t/** ObjectRef and owner of mutated objects, including gas object. */\n\t\tmutated?: OwnedObjectRef[];\n\t\t/**\n\t\t * The object references of the shared objects used in this transaction. Empty if no shared objects\n\t\t * were used.\n\t\t */\n\t\tsharedObjects?: SuiObjectRef[];\n\t\t/** The status of the execution */\n\t\tstatus: ExecutionStatus;\n\t\t/** The transaction digest */\n\t\ttransactionDigest: string;\n\t\t/**\n\t\t * ObjectRef and owner of objects that are unwrapped in this transaction. Unwrapped objects are objects\n\t\t * that were wrapped into other objects in the past, and just got extracted out.\n\t\t */\n\t\tunwrapped?: OwnedObjectRef[];\n\t\t/** Object refs of objects previously wrapped in other objects but now deleted. */\n\t\tunwrappedThenDeleted?: SuiObjectRef[];\n\t\t/** Object refs of objects now wrapped in other objects. */\n\t\twrapped?: SuiObjectRef[];\n\t};\nexport interface TransactionBlockEffectsModifiedAtVersions {\n\tobjectId: string;\n\tsequenceNumber: string;\n}\nexport type SuiTransactionBlockKind =\n\t/** A system transaction that will update epoch information on-chain. */\n\t| {\n\t\t\tcomputation_charge: string;\n\t\t\tepoch: string;\n\t\t\tepoch_start_timestamp_ms: string;\n\t\t\tkind: 'ChangeEpoch';\n\t\t\tstorage_charge: string;\n\t\t\tstorage_rebate: string;\n\t } /** A system transaction used for initializing the initial state of the chain. */\n\t| {\n\t\t\tkind: 'Genesis';\n\t\t\tobjects: string[];\n\t } /** A system transaction marking the start of a series of transactions scheduled as part of a checkpoint */\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologue';\n\t\t\tround: string;\n\t } /** A series of transactions where the results of one transaction can be used in future transactions */\n\t| {\n\t\t\t/** Input objects or primitive values */\n\t\t\tinputs: SuiCallArg[];\n\t\t\tkind: 'ProgrammableTransaction';\n\t\t\t/**\n\t\t\t * The transactions to be executed sequentially. A failure in any transaction will result in the\n\t\t\t * failure of the entire programmable transaction block.\n\t\t\t */\n\t\t\ttransactions: SuiTransaction[];\n\t } /** A transaction which updates global authenticator state */\n\t| {\n\t\t\tepoch: string;\n\t\t\tkind: 'AuthenticatorStateUpdate';\n\t\t\tnew_active_jwks: SuiActiveJwk[];\n\t\t\tround: string;\n\t } /** A transaction which updates global randomness state */\n\t| {\n\t\t\tepoch: string;\n\t\t\tkind: 'RandomnessStateUpdate';\n\t\t\trandom_bytes: number[];\n\t\t\trandomness_round: string;\n\t } /** The transaction which occurs only at the end of the epoch */\n\t| {\n\t\t\tkind: 'EndOfEpochTransaction';\n\t\t\ttransactions: SuiEndOfEpochTransactionKind[];\n\t }\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tconsensus_commit_digest: string;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologueV2';\n\t\t\tround: string;\n\t }\n\t| {\n\t\t\tcommit_timestamp_ms: string;\n\t\t\tconsensus_commit_digest: string;\n\t\t\tconsensus_determined_version_assignments: ConsensusDeterminedVersionAssignments;\n\t\t\tepoch: string;\n\t\t\tkind: 'ConsensusCommitPrologueV3';\n\t\t\tround: string;\n\t\t\tsub_dag_index?: string | null;\n\t };\nexport interface SuiTransactionBlockResponse {\n\tbalanceChanges?: BalanceChange[] | null;\n\t/**\n\t * The checkpoint number when this transaction was included and hence finalized. This is only returned\n\t * in the read api, not in the transaction execution api.\n\t */\n\tcheckpoint?: string | null;\n\tconfirmedLocalExecution?: boolean | null;\n\tdigest: string;\n\teffects?: TransactionEffects | null;\n\terrors?: string[];\n\tevents?: SuiEvent[] | null;\n\tobjectChanges?: SuiObjectChange[] | null;\n\trawEffects?: number[];\n\t/**\n\t * BCS encoded [SenderSignedData] that includes input object references returns empty array if\n\t * `show_raw_transaction` is false\n\t */\n\trawTransaction?: string;\n\ttimestampMs?: string | null;\n\t/** Transaction input data */\n\ttransaction?: SuiTransactionBlock | null;\n}\nexport interface SuiTransactionBlockResponseOptions {\n\t/** Whether to show balance_changes. Default to be False */\n\tshowBalanceChanges?: boolean;\n\t/** Whether to show transaction effects. Default to be False */\n\tshowEffects?: boolean;\n\t/** Whether to show transaction events. Default to be False */\n\tshowEvents?: boolean;\n\t/** Whether to show transaction input data. Default to be False */\n\tshowInput?: boolean;\n\t/** Whether to show object_changes. Default to be False */\n\tshowObjectChanges?: boolean;\n\t/** Whether to show raw transaction effects. Default to be False */\n\tshowRawEffects?: boolean;\n\t/** Whether to show bcs-encoded transaction input data */\n\tshowRawInput?: boolean;\n}\nexport interface SuiTransactionBlockResponseQuery {\n\t/** If None, no filter will be applied */\n\tfilter?: TransactionFilter | null;\n\t/** config which fields to include in the response, by default only digest is included */\n\toptions?: SuiTransactionBlockResponseOptions | null;\n}\nexport type TransactionFilter =\n\t/** Query by checkpoint. */\n\t| {\n\t\t\tCheckpoint: string;\n\t } /** Query by move function. */\n\t| {\n\t\t\tMoveFunction: {\n\t\t\t\tfunction?: string | null;\n\t\t\t\tmodule?: string | null;\n\t\t\t\tpackage: string;\n\t\t\t};\n\t } /** Query by input object. */\n\t| {\n\t\t\tInputObject: string;\n\t } /** Query by changed object, including created, mutated and unwrapped objects. */\n\t| {\n\t\t\tChangedObject: string;\n\t } /** Query by sender address. */\n\t| {\n\t\t\tFromAddress: string;\n\t } /** Query by recipient address. */\n\t| {\n\t\t\tToAddress: string;\n\t } /** Query by sender and recipient address. */\n\t| {\n\t\t\tFromAndToAddress: {\n\t\t\t\tfrom: string;\n\t\t\t\tto: string;\n\t\t\t};\n\t } /** Query txs that have a given address as sender or recipient. */\n\t| {\n\t\t\tFromOrToAddress: {\n\t\t\t\taddr: string;\n\t\t\t};\n\t } /** Query by transaction kind */\n\t| {\n\t\t\tTransactionKind: string;\n\t } /** Query transactions of any given kind in the input. */\n\t| {\n\t\t\tTransactionKindIn: string[];\n\t };\nexport interface TransferObjectParams {\n\tobjectId: string;\n\trecipient: string;\n}\n/** Identifies a struct and the module it was defined in */\nexport interface TypeOrigin {\n\tdatatype_name: string;\n\tmodule_name: string;\n\tpackage: string;\n}\n/** Upgraded package info for the linkage table */\nexport interface UpgradeInfo {\n\t/** ID of the upgraded packages */\n\tupgraded_id: string;\n\t/** Version of the upgraded package */\n\tupgraded_version: string;\n}\nexport interface ValidatorApy {\n\taddress: string;\n\tapy: number;\n}\nexport interface ValidatorsApy {\n\tapys: ValidatorApy[];\n\tepoch: string;\n}\n/** An zk login authenticator with all the necessary fields. */\nexport interface ZkLoginAuthenticator {\n\tinputs: ZkLoginInputs;\n\tmaxEpoch: string;\n\tuserSignature: Signature;\n}\n/** All inputs required for the zk login proof verification and other public inputs. */\nexport interface ZkLoginInputs {\n\taddressSeed: string;\n\theaderBase64: string;\n\tissBase64Details: Claim;\n\tproofPoints: ZkLoginProof;\n}\n/** The struct for zk login proof. */\nexport interface ZkLoginProof {\n\ta: string[];\n\tb: string[][];\n\tc: string[];\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -51,7 +51,7 @@ class Signer {
51
51
  });
52
52
  return {
53
53
  signature,
54
- bytes: (0, import_bcs.toB64)(bytes)
54
+ bytes: (0, import_bcs.toBase64)(bytes)
55
55
  };
56
56
  }
57
57
  /**
@@ -69,7 +69,7 @@ class Signer {
69
69
  "PersonalMessage"
70
70
  );
71
71
  return {
72
- bytes: (0, import_bcs.toB64)(bytes),
72
+ bytes: (0, import_bcs.toBase64)(bytes),
73
73
  signature
74
74
  };
75
75
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cryptography/keypair.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs, toB64 } from '@mysten/bcs';\nimport { blake2b } from '@noble/hashes/blake2b';\nimport { bech32 } from 'bech32';\n\nimport type { IntentScope } from './intent.js';\nimport { messageWithIntent } from './intent.js';\nimport type { PublicKey } from './publickey.js';\nimport { SIGNATURE_FLAG_TO_SCHEME, SIGNATURE_SCHEME_TO_FLAG } from './signature-scheme.js';\nimport type { SignatureScheme } from './signature-scheme.js';\nimport { toSerializedSignature } from './signature.js';\n\nexport const PRIVATE_KEY_SIZE = 32;\nexport const LEGACY_PRIVATE_KEY_SIZE = 64;\nexport const SUI_PRIVATE_KEY_PREFIX = 'suiprivkey';\n\nexport type ParsedKeypair = {\n\tschema: SignatureScheme;\n\tsecretKey: Uint8Array;\n};\n\nexport interface SignatureWithBytes {\n\tbytes: string;\n\tsignature: string;\n}\n\n/**\n * TODO: Document\n */\nexport abstract class Signer {\n\tabstract sign(bytes: Uint8Array): Promise<Uint8Array>;\n\t/**\n\t * Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing,\n\t * it ensures that a signed message is tied to a specific purpose and domain separator is provided\n\t */\n\tasync signWithIntent(bytes: Uint8Array, intent: IntentScope): Promise<SignatureWithBytes> {\n\t\tconst intentMessage = messageWithIntent(intent, bytes);\n\t\tconst digest = blake2b(intentMessage, { dkLen: 32 });\n\n\t\tconst signature = toSerializedSignature({\n\t\t\tsignature: await this.sign(digest),\n\t\t\tsignatureScheme: this.getKeyScheme(),\n\t\t\tpublicKey: this.getPublicKey(),\n\t\t});\n\n\t\treturn {\n\t\t\tsignature,\n\t\t\tbytes: toB64(bytes),\n\t\t};\n\t}\n\t/**\n\t * Signs provided transaction by calling `signWithIntent()` with a `TransactionData` provided as intent scope\n\t */\n\tasync signTransaction(bytes: Uint8Array) {\n\t\treturn this.signWithIntent(bytes, 'TransactionData');\n\t}\n\t/**\n\t * Signs provided personal message by calling `signWithIntent()` with a `PersonalMessage` provided as intent scope\n\t */\n\tasync signPersonalMessage(bytes: Uint8Array) {\n\t\tconst { signature } = await this.signWithIntent(\n\t\t\tbcs.vector(bcs.u8()).serialize(bytes).toBytes(),\n\t\t\t'PersonalMessage',\n\t\t);\n\n\t\treturn {\n\t\t\tbytes: toB64(bytes),\n\t\t\tsignature,\n\t\t};\n\t}\n\n\ttoSuiAddress(): string {\n\t\treturn this.getPublicKey().toSuiAddress();\n\t}\n\n\t/**\n\t * Get the key scheme of the keypair: Secp256k1 or ED25519\n\t */\n\tabstract getKeyScheme(): SignatureScheme;\n\n\t/**\n\t * The public key for this keypair\n\t */\n\tabstract getPublicKey(): PublicKey;\n}\n\nexport abstract class Keypair extends Signer {\n\t/**\n\t * This returns the Bech32 secret key string for this keypair.\n\t */\n\tabstract getSecretKey(): string;\n}\n\n/**\n * This returns an ParsedKeypair object based by validating the\n * 33-byte Bech32 encoded string starting with `suiprivkey`, and\n * parse out the signature scheme and the private key in bytes.\n */\nexport function decodeSuiPrivateKey(value: string): ParsedKeypair {\n\tconst { prefix, words } = bech32.decode(value);\n\tif (prefix !== SUI_PRIVATE_KEY_PREFIX) {\n\t\tthrow new Error('invalid private key prefix');\n\t}\n\tconst extendedSecretKey = new Uint8Array(bech32.fromWords(words));\n\tconst secretKey = extendedSecretKey.slice(1);\n\tconst signatureScheme =\n\t\tSIGNATURE_FLAG_TO_SCHEME[extendedSecretKey[0] as keyof typeof SIGNATURE_FLAG_TO_SCHEME];\n\treturn {\n\t\tschema: signatureScheme,\n\t\tsecretKey: secretKey,\n\t};\n}\n\n/**\n * This returns a Bech32 encoded string starting with `suiprivkey`,\n * encoding 33-byte `flag || bytes` for the given the 32-byte private\n * key and its signature scheme.\n */\nexport function encodeSuiPrivateKey(bytes: Uint8Array, scheme: SignatureScheme): string {\n\tif (bytes.length !== PRIVATE_KEY_SIZE) {\n\t\tthrow new Error('Invalid bytes length');\n\t}\n\tconst flag = SIGNATURE_SCHEME_TO_FLAG[scheme];\n\tconst privKeyBytes = new Uint8Array(bytes.length + 1);\n\tprivKeyBytes.set([flag]);\n\tprivKeyBytes.set(bytes, 1);\n\treturn bech32.encode(SUI_PRIVATE_KEY_PREFIX, bech32.toWords(privKeyBytes));\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA2B;AAC3B,qBAAwB;AACxB,oBAAuB;AAGvB,oBAAkC;AAElC,8BAAmE;AAEnE,uBAAsC;AAE/B,MAAM,mBAAmB;AACzB,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAe/B,MAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5B,MAAM,eAAe,OAAmB,QAAkD;AACzF,UAAM,oBAAgB,iCAAkB,QAAQ,KAAK;AACrD,UAAM,aAAS,wBAAQ,eAAe,EAAE,OAAO,GAAG,CAAC;AAEnD,UAAM,gBAAY,wCAAsB;AAAA,MACvC,WAAW,MAAM,KAAK,KAAK,MAAM;AAAA,MACjC,iBAAiB,KAAK,aAAa;AAAA,MACnC,WAAW,KAAK,aAAa;AAAA,IAC9B,CAAC;AAED,WAAO;AAAA,MACN;AAAA,MACA,WAAO,kBAAM,KAAK;AAAA,IACnB;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,gBAAgB,OAAmB;AACxC,WAAO,KAAK,eAAe,OAAO,iBAAiB;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,oBAAoB,OAAmB;AAC5C,UAAM,EAAE,UAAU,IAAI,MAAM,KAAK;AAAA,MAChC,eAAI,OAAO,eAAI,GAAG,CAAC,EAAE,UAAU,KAAK,EAAE,QAAQ;AAAA,MAC9C;AAAA,IACD;AAEA,WAAO;AAAA,MACN,WAAO,kBAAM,KAAK;AAAA,MAClB;AAAA,IACD;AAAA,EACD;AAAA,EAEA,eAAuB;AACtB,WAAO,KAAK,aAAa,EAAE,aAAa;AAAA,EACzC;AAWD;AAEO,MAAe,gBAAgB,OAAO;AAK7C;AAOO,SAAS,oBAAoB,OAA8B;AACjE,QAAM,EAAE,QAAQ,MAAM,IAAI,qBAAO,OAAO,KAAK;AAC7C,MAAI,WAAW,wBAAwB;AACtC,UAAM,IAAI,MAAM,4BAA4B;AAAA,EAC7C;AACA,QAAM,oBAAoB,IAAI,WAAW,qBAAO,UAAU,KAAK,CAAC;AAChE,QAAM,YAAY,kBAAkB,MAAM,CAAC;AAC3C,QAAM,kBACL,iDAAyB,kBAAkB,CAAC,CAA0C;AACvF,SAAO;AAAA,IACN,QAAQ;AAAA,IACR;AAAA,EACD;AACD;AAOO,SAAS,oBAAoB,OAAmB,QAAiC;AACvF,MAAI,MAAM,WAAW,kBAAkB;AACtC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACvC;AACA,QAAM,OAAO,iDAAyB,MAAM;AAC5C,QAAM,eAAe,IAAI,WAAW,MAAM,SAAS,CAAC;AACpD,eAAa,IAAI,CAAC,IAAI,CAAC;AACvB,eAAa,IAAI,OAAO,CAAC;AACzB,SAAO,qBAAO,OAAO,wBAAwB,qBAAO,QAAQ,YAAY,CAAC;AAC1E;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bcs, toBase64 } from '@mysten/bcs';\nimport { blake2b } from '@noble/hashes/blake2b';\nimport { bech32 } from 'bech32';\n\nimport type { IntentScope } from './intent.js';\nimport { messageWithIntent } from './intent.js';\nimport type { PublicKey } from './publickey.js';\nimport { SIGNATURE_FLAG_TO_SCHEME, SIGNATURE_SCHEME_TO_FLAG } from './signature-scheme.js';\nimport type { SignatureScheme } from './signature-scheme.js';\nimport { toSerializedSignature } from './signature.js';\n\nexport const PRIVATE_KEY_SIZE = 32;\nexport const LEGACY_PRIVATE_KEY_SIZE = 64;\nexport const SUI_PRIVATE_KEY_PREFIX = 'suiprivkey';\n\nexport type ParsedKeypair = {\n\tschema: SignatureScheme;\n\tsecretKey: Uint8Array;\n};\n\nexport interface SignatureWithBytes {\n\tbytes: string;\n\tsignature: string;\n}\n\n/**\n * TODO: Document\n */\nexport abstract class Signer {\n\tabstract sign(bytes: Uint8Array): Promise<Uint8Array>;\n\t/**\n\t * Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing,\n\t * it ensures that a signed message is tied to a specific purpose and domain separator is provided\n\t */\n\tasync signWithIntent(bytes: Uint8Array, intent: IntentScope): Promise<SignatureWithBytes> {\n\t\tconst intentMessage = messageWithIntent(intent, bytes);\n\t\tconst digest = blake2b(intentMessage, { dkLen: 32 });\n\n\t\tconst signature = toSerializedSignature({\n\t\t\tsignature: await this.sign(digest),\n\t\t\tsignatureScheme: this.getKeyScheme(),\n\t\t\tpublicKey: this.getPublicKey(),\n\t\t});\n\n\t\treturn {\n\t\t\tsignature,\n\t\t\tbytes: toBase64(bytes),\n\t\t};\n\t}\n\t/**\n\t * Signs provided transaction by calling `signWithIntent()` with a `TransactionData` provided as intent scope\n\t */\n\tasync signTransaction(bytes: Uint8Array) {\n\t\treturn this.signWithIntent(bytes, 'TransactionData');\n\t}\n\t/**\n\t * Signs provided personal message by calling `signWithIntent()` with a `PersonalMessage` provided as intent scope\n\t */\n\tasync signPersonalMessage(bytes: Uint8Array) {\n\t\tconst { signature } = await this.signWithIntent(\n\t\t\tbcs.vector(bcs.u8()).serialize(bytes).toBytes(),\n\t\t\t'PersonalMessage',\n\t\t);\n\n\t\treturn {\n\t\t\tbytes: toBase64(bytes),\n\t\t\tsignature,\n\t\t};\n\t}\n\n\ttoSuiAddress(): string {\n\t\treturn this.getPublicKey().toSuiAddress();\n\t}\n\n\t/**\n\t * Get the key scheme of the keypair: Secp256k1 or ED25519\n\t */\n\tabstract getKeyScheme(): SignatureScheme;\n\n\t/**\n\t * The public key for this keypair\n\t */\n\tabstract getPublicKey(): PublicKey;\n}\n\nexport abstract class Keypair extends Signer {\n\t/**\n\t * This returns the Bech32 secret key string for this keypair.\n\t */\n\tabstract getSecretKey(): string;\n}\n\n/**\n * This returns an ParsedKeypair object based by validating the\n * 33-byte Bech32 encoded string starting with `suiprivkey`, and\n * parse out the signature scheme and the private key in bytes.\n */\nexport function decodeSuiPrivateKey(value: string): ParsedKeypair {\n\tconst { prefix, words } = bech32.decode(value);\n\tif (prefix !== SUI_PRIVATE_KEY_PREFIX) {\n\t\tthrow new Error('invalid private key prefix');\n\t}\n\tconst extendedSecretKey = new Uint8Array(bech32.fromWords(words));\n\tconst secretKey = extendedSecretKey.slice(1);\n\tconst signatureScheme =\n\t\tSIGNATURE_FLAG_TO_SCHEME[extendedSecretKey[0] as keyof typeof SIGNATURE_FLAG_TO_SCHEME];\n\treturn {\n\t\tschema: signatureScheme,\n\t\tsecretKey: secretKey,\n\t};\n}\n\n/**\n * This returns a Bech32 encoded string starting with `suiprivkey`,\n * encoding 33-byte `flag || bytes` for the given the 32-byte private\n * key and its signature scheme.\n */\nexport function encodeSuiPrivateKey(bytes: Uint8Array, scheme: SignatureScheme): string {\n\tif (bytes.length !== PRIVATE_KEY_SIZE) {\n\t\tthrow new Error('Invalid bytes length');\n\t}\n\tconst flag = SIGNATURE_SCHEME_TO_FLAG[scheme];\n\tconst privKeyBytes = new Uint8Array(bytes.length + 1);\n\tprivKeyBytes.set([flag]);\n\tprivKeyBytes.set(bytes, 1);\n\treturn bech32.encode(SUI_PRIVATE_KEY_PREFIX, bech32.toWords(privKeyBytes));\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA8B;AAC9B,qBAAwB;AACxB,oBAAuB;AAGvB,oBAAkC;AAElC,8BAAmE;AAEnE,uBAAsC;AAE/B,MAAM,mBAAmB;AACzB,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAe/B,MAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5B,MAAM,eAAe,OAAmB,QAAkD;AACzF,UAAM,oBAAgB,iCAAkB,QAAQ,KAAK;AACrD,UAAM,aAAS,wBAAQ,eAAe,EAAE,OAAO,GAAG,CAAC;AAEnD,UAAM,gBAAY,wCAAsB;AAAA,MACvC,WAAW,MAAM,KAAK,KAAK,MAAM;AAAA,MACjC,iBAAiB,KAAK,aAAa;AAAA,MACnC,WAAW,KAAK,aAAa;AAAA,IAC9B,CAAC;AAED,WAAO;AAAA,MACN;AAAA,MACA,WAAO,qBAAS,KAAK;AAAA,IACtB;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,gBAAgB,OAAmB;AACxC,WAAO,KAAK,eAAe,OAAO,iBAAiB;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,oBAAoB,OAAmB;AAC5C,UAAM,EAAE,UAAU,IAAI,MAAM,KAAK;AAAA,MAChC,eAAI,OAAO,eAAI,GAAG,CAAC,EAAE,UAAU,KAAK,EAAE,QAAQ;AAAA,MAC9C;AAAA,IACD;AAEA,WAAO;AAAA,MACN,WAAO,qBAAS,KAAK;AAAA,MACrB;AAAA,IACD;AAAA,EACD;AAAA,EAEA,eAAuB;AACtB,WAAO,KAAK,aAAa,EAAE,aAAa;AAAA,EACzC;AAWD;AAEO,MAAe,gBAAgB,OAAO;AAK7C;AAOO,SAAS,oBAAoB,OAA8B;AACjE,QAAM,EAAE,QAAQ,MAAM,IAAI,qBAAO,OAAO,KAAK;AAC7C,MAAI,WAAW,wBAAwB;AACtC,UAAM,IAAI,MAAM,4BAA4B;AAAA,EAC7C;AACA,QAAM,oBAAoB,IAAI,WAAW,qBAAO,UAAU,KAAK,CAAC;AAChE,QAAM,YAAY,kBAAkB,MAAM,CAAC;AAC3C,QAAM,kBACL,iDAAyB,kBAAkB,CAAC,CAA0C;AACvF,SAAO;AAAA,IACN,QAAQ;AAAA,IACR;AAAA,EACD;AACD;AAOO,SAAS,oBAAoB,OAAmB,QAAiC;AACvF,MAAI,MAAM,WAAW,kBAAkB;AACtC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACvC;AACA,QAAM,OAAO,iDAAyB,MAAM;AAC5C,QAAM,eAAe,IAAI,WAAW,MAAM,SAAS,CAAC;AACpD,eAAa,IAAI,CAAC,IAAI,CAAC;AACvB,eAAa,IAAI,OAAO,CAAC;AACzB,SAAO,qBAAO,OAAO,wBAAwB,qBAAO,QAAQ,YAAY,CAAC;AAC1E;",
6
6
  "names": []
7
7
  }
@@ -42,6 +42,6 @@ function mnemonicToSeed(mnemonics) {
42
42
  return (0, import_bip39.mnemonicToSeedSync)(mnemonics, "");
43
43
  }
44
44
  function mnemonicToSeedHex(mnemonics) {
45
- return (0, import_bcs.toHEX)(mnemonicToSeed(mnemonics));
45
+ return (0, import_bcs.toHex)(mnemonicToSeed(mnemonics));
46
46
  }
47
47
  //# sourceMappingURL=mnemonics.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cryptography/mnemonics.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { toHEX } from '@mysten/bcs';\nimport { mnemonicToSeedSync as bip39MnemonicToSeedSync } from '@scure/bip39';\n\n/**\n * Parse and validate a path that is compliant to SLIP-0010 in form m/44'/784'/{account_index}'/{change_index}'/{address_index}'.\n *\n * @param path path string (e.g. `m/44'/784'/0'/0'/0'`).\n */\nexport function isValidHardenedPath(path: string): boolean {\n\tif (!new RegExp(\"^m\\\\/44'\\\\/784'\\\\/[0-9]+'\\\\/[0-9]+'\\\\/[0-9]+'+$\").test(path)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Parse and validate a path that is compliant to BIP-32 in form m/54'/784'/{account_index}'/{change_index}/{address_index}\n * for Secp256k1 and m/74'/784'/{account_index}'/{change_index}/{address_index} for Secp256r1.\n *\n * Note that the purpose for Secp256k1 is registered as 54, to differentiate from Ed25519 with purpose 44.\n *\n * @param path path string (e.g. `m/54'/784'/0'/0/0`).\n */\nexport function isValidBIP32Path(path: string): boolean {\n\tif (!new RegExp(\"^m\\\\/(54|74)'\\\\/784'\\\\/[0-9]+'\\\\/[0-9]+\\\\/[0-9]+$\").test(path)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Uses KDF to derive 64 bytes of key data from mnemonic with empty password.\n *\n * @param mnemonics 12 words string split by spaces.\n */\nexport function mnemonicToSeed(mnemonics: string): Uint8Array {\n\treturn bip39MnemonicToSeedSync(mnemonics, '');\n}\n\n/**\n * Derive the seed in hex format from a 12-word mnemonic string.\n *\n * @param mnemonics 12 words string split by spaces.\n */\nexport function mnemonicToSeedHex(mnemonics: string): string {\n\treturn toHEX(mnemonicToSeed(mnemonics));\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { toHex } from '@mysten/bcs';\nimport { mnemonicToSeedSync as bip39MnemonicToSeedSync } from '@scure/bip39';\n\n/**\n * Parse and validate a path that is compliant to SLIP-0010 in form m/44'/784'/{account_index}'/{change_index}'/{address_index}'.\n *\n * @param path path string (e.g. `m/44'/784'/0'/0'/0'`).\n */\nexport function isValidHardenedPath(path: string): boolean {\n\tif (!new RegExp(\"^m\\\\/44'\\\\/784'\\\\/[0-9]+'\\\\/[0-9]+'\\\\/[0-9]+'+$\").test(path)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Parse and validate a path that is compliant to BIP-32 in form m/54'/784'/{account_index}'/{change_index}/{address_index}\n * for Secp256k1 and m/74'/784'/{account_index}'/{change_index}/{address_index} for Secp256r1.\n *\n * Note that the purpose for Secp256k1 is registered as 54, to differentiate from Ed25519 with purpose 44.\n *\n * @param path path string (e.g. `m/54'/784'/0'/0/0`).\n */\nexport function isValidBIP32Path(path: string): boolean {\n\tif (!new RegExp(\"^m\\\\/(54|74)'\\\\/784'\\\\/[0-9]+'\\\\/[0-9]+\\\\/[0-9]+$\").test(path)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Uses KDF to derive 64 bytes of key data from mnemonic with empty password.\n *\n * @param mnemonics 12 words string split by spaces.\n */\nexport function mnemonicToSeed(mnemonics: string): Uint8Array {\n\treturn bip39MnemonicToSeedSync(mnemonics, '');\n}\n\n/**\n * Derive the seed in hex format from a 12-word mnemonic string.\n *\n * @param mnemonics 12 words string split by spaces.\n */\nexport function mnemonicToSeedHex(mnemonics: string): string {\n\treturn toHex(mnemonicToSeed(mnemonics));\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAsB;AACtB,mBAA8D;AAOvD,SAAS,oBAAoB,MAAuB;AAC1D,MAAI,CAAC,IAAI,OAAO,iDAAiD,EAAE,KAAK,IAAI,GAAG;AAC9E,WAAO;AAAA,EACR;AACA,SAAO;AACR;AAUO,SAAS,iBAAiB,MAAuB;AACvD,MAAI,CAAC,IAAI,OAAO,mDAAmD,EAAE,KAAK,IAAI,GAAG;AAChF,WAAO;AAAA,EACR;AACA,SAAO;AACR;AAOO,SAAS,eAAe,WAA+B;AAC7D,aAAO,aAAAA,oBAAwB,WAAW,EAAE;AAC7C;AAOO,SAAS,kBAAkB,WAA2B;AAC5D,aAAO,kBAAM,eAAe,SAAS,CAAC;AACvC;",
6
6
  "names": ["bip39MnemonicToSeedSync"]
7
7
  }
@@ -51,7 +51,7 @@ class PublicKey {
51
51
  * Return the base-64 representation of the public key
52
52
  */
53
53
  toBase64() {
54
- return (0, import_bcs.toB64)(this.toRawBytes());
54
+ return (0, import_bcs.toBase64)(this.toRawBytes());
55
55
  }
56
56
  toString() {
57
57
  throw new Error(
@@ -65,7 +65,7 @@ class PublicKey {
65
65
  */
66
66
  toSuiPublicKey() {
67
67
  const bytes = this.toSuiBytes();
68
- return (0, import_bcs.toB64)(bytes);
68
+ return (0, import_bcs.toBase64)(bytes);
69
69
  }
70
70
  verifyWithIntent(bytes, signature, intent) {
71
71
  const intentMessage = (0, import_intent.messageWithIntent)(intent, bytes);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cryptography/publickey.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { toB64 } from '@mysten/bcs';\nimport { blake2b } from '@noble/hashes/blake2b';\nimport { bytesToHex } from '@noble/hashes/utils';\n\nimport { bcs } from '../bcs/index.js';\nimport { normalizeSuiAddress, SUI_ADDRESS_LENGTH } from '../utils/sui-types.js';\nimport type { IntentScope } from './intent.js';\nimport { messageWithIntent } from './intent.js';\n\n/**\n * Value to be converted into public key.\n */\nexport type PublicKeyInitData = string | Uint8Array | Iterable<number>;\n\nexport function bytesEqual(a: Uint8Array, b: Uint8Array) {\n\tif (a === b) return true;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (let i = 0; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * A public key\n */\nexport abstract class PublicKey {\n\t/**\n\t * Checks if two public keys are equal\n\t */\n\tequals(publicKey: PublicKey) {\n\t\treturn bytesEqual(this.toRawBytes(), publicKey.toRawBytes());\n\t}\n\n\t/**\n\t * Return the base-64 representation of the public key\n\t */\n\ttoBase64() {\n\t\treturn toB64(this.toRawBytes());\n\t}\n\n\ttoString(): never {\n\t\tthrow new Error(\n\t\t\t'`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.',\n\t\t);\n\t}\n\n\t/**\n\t * Return the Sui representation of the public key encoded in\n\t * base-64. A Sui public key is formed by the concatenation\n\t * of the scheme flag with the raw bytes of the public key\n\t */\n\ttoSuiPublicKey(): string {\n\t\tconst bytes = this.toSuiBytes();\n\t\treturn toB64(bytes);\n\t}\n\n\tverifyWithIntent(\n\t\tbytes: Uint8Array,\n\t\tsignature: Uint8Array | string,\n\t\tintent: IntentScope,\n\t): Promise<boolean> {\n\t\tconst intentMessage = messageWithIntent(intent, bytes);\n\t\tconst digest = blake2b(intentMessage, { dkLen: 32 });\n\n\t\treturn this.verify(digest, signature);\n\t}\n\n\t/**\n\t * Verifies that the signature is valid for for the provided PersonalMessage\n\t */\n\tverifyPersonalMessage(message: Uint8Array, signature: Uint8Array | string): Promise<boolean> {\n\t\treturn this.verifyWithIntent(\n\t\t\tbcs.vector(bcs.u8()).serialize(message).toBytes(),\n\t\t\tsignature,\n\t\t\t'PersonalMessage',\n\t\t);\n\t}\n\n\t/**\n\t * Verifies that the signature is valid for for the provided Transaction\n\t */\n\tverifyTransaction(transaction: Uint8Array, signature: Uint8Array | string): Promise<boolean> {\n\t\treturn this.verifyWithIntent(transaction, signature, 'TransactionData');\n\t}\n\n\t/**\n\t * Returns the bytes representation of the public key\n\t * prefixed with the signature scheme flag\n\t */\n\ttoSuiBytes(): Uint8Array {\n\t\tconst rawBytes = this.toRawBytes();\n\t\tconst suiBytes = new Uint8Array(rawBytes.length + 1);\n\t\tsuiBytes.set([this.flag()]);\n\t\tsuiBytes.set(rawBytes, 1);\n\n\t\treturn suiBytes;\n\t}\n\n\t/**\n\t * Return the Sui address associated with this Ed25519 public key\n\t */\n\ttoSuiAddress(): string {\n\t\t// Each hex char represents half a byte, hence hex address doubles the length\n\t\treturn normalizeSuiAddress(\n\t\t\tbytesToHex(blake2b(this.toSuiBytes(), { dkLen: 32 })).slice(0, SUI_ADDRESS_LENGTH * 2),\n\t\t);\n\t}\n\n\t/**\n\t * Return the byte array representation of the public key\n\t */\n\tabstract toRawBytes(): Uint8Array;\n\n\t/**\n\t * Return signature scheme flag of the public key\n\t */\n\tabstract flag(): number;\n\n\t/**\n\t * Verifies that the signature is valid for for the provided message\n\t */\n\tabstract verify(data: Uint8Array, signature: Uint8Array | string): Promise<boolean>;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAsB;AACtB,qBAAwB;AACxB,mBAA2B;AAE3B,IAAAA,cAAoB;AACpB,uBAAwD;AAExD,oBAAkC;AAO3B,SAAS,WAAW,GAAe,GAAe;AACxD,MAAI,MAAM,EAAG,QAAO;AAEpB,MAAI,EAAE,WAAW,EAAE,QAAQ;AAC1B,WAAO;AAAA,EACR;AAEA,WAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;AAClC,QAAI,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG;AAClB,aAAO;AAAA,IACR;AAAA,EACD;AACA,SAAO;AACR;AAKO,MAAe,UAAU;AAAA;AAAA;AAAA;AAAA,EAI/B,OAAO,WAAsB;AAC5B,WAAO,WAAW,KAAK,WAAW,GAAG,UAAU,WAAW,CAAC;AAAA,EAC5D;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW;AACV,eAAO,kBAAM,KAAK,WAAW,CAAC;AAAA,EAC/B;AAAA,EAEA,WAAkB;AACjB,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,iBAAyB;AACxB,UAAM,QAAQ,KAAK,WAAW;AAC9B,eAAO,kBAAM,KAAK;AAAA,EACnB;AAAA,EAEA,iBACC,OACA,WACA,QACmB;AACnB,UAAM,oBAAgB,iCAAkB,QAAQ,KAAK;AACrD,UAAM,aAAS,wBAAQ,eAAe,EAAE,OAAO,GAAG,CAAC;AAEnD,WAAO,KAAK,OAAO,QAAQ,SAAS;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,sBAAsB,SAAqB,WAAkD;AAC5F,WAAO,KAAK;AAAA,MACX,gBAAI,OAAO,gBAAI,GAAG,CAAC,EAAE,UAAU,OAAO,EAAE,QAAQ;AAAA,MAChD;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAKA,kBAAkB,aAAyB,WAAkD;AAC5F,WAAO,KAAK,iBAAiB,aAAa,WAAW,iBAAiB;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,aAAyB;AACxB,UAAM,WAAW,KAAK,WAAW;AACjC,UAAM,WAAW,IAAI,WAAW,SAAS,SAAS,CAAC;AACnD,aAAS,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAC1B,aAAS,IAAI,UAAU,CAAC;AAExB,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,eAAuB;AAEtB,eAAO;AAAA,UACN,6BAAW,wBAAQ,KAAK,WAAW,GAAG,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,sCAAqB,CAAC;AAAA,IACtF;AAAA,EACD;AAgBD;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { toBase64 } from '@mysten/bcs';\nimport { blake2b } from '@noble/hashes/blake2b';\nimport { bytesToHex } from '@noble/hashes/utils';\n\nimport { bcs } from '../bcs/index.js';\nimport { normalizeSuiAddress, SUI_ADDRESS_LENGTH } from '../utils/sui-types.js';\nimport type { IntentScope } from './intent.js';\nimport { messageWithIntent } from './intent.js';\n\n/**\n * Value to be converted into public key.\n */\nexport type PublicKeyInitData = string | Uint8Array | Iterable<number>;\n\nexport function bytesEqual(a: Uint8Array, b: Uint8Array) {\n\tif (a === b) return true;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (let i = 0; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * A public key\n */\nexport abstract class PublicKey {\n\t/**\n\t * Checks if two public keys are equal\n\t */\n\tequals(publicKey: PublicKey) {\n\t\treturn bytesEqual(this.toRawBytes(), publicKey.toRawBytes());\n\t}\n\n\t/**\n\t * Return the base-64 representation of the public key\n\t */\n\ttoBase64() {\n\t\treturn toBase64(this.toRawBytes());\n\t}\n\n\ttoString(): never {\n\t\tthrow new Error(\n\t\t\t'`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.',\n\t\t);\n\t}\n\n\t/**\n\t * Return the Sui representation of the public key encoded in\n\t * base-64. A Sui public key is formed by the concatenation\n\t * of the scheme flag with the raw bytes of the public key\n\t */\n\ttoSuiPublicKey(): string {\n\t\tconst bytes = this.toSuiBytes();\n\t\treturn toBase64(bytes);\n\t}\n\n\tverifyWithIntent(\n\t\tbytes: Uint8Array,\n\t\tsignature: Uint8Array | string,\n\t\tintent: IntentScope,\n\t): Promise<boolean> {\n\t\tconst intentMessage = messageWithIntent(intent, bytes);\n\t\tconst digest = blake2b(intentMessage, { dkLen: 32 });\n\n\t\treturn this.verify(digest, signature);\n\t}\n\n\t/**\n\t * Verifies that the signature is valid for for the provided PersonalMessage\n\t */\n\tverifyPersonalMessage(message: Uint8Array, signature: Uint8Array | string): Promise<boolean> {\n\t\treturn this.verifyWithIntent(\n\t\t\tbcs.vector(bcs.u8()).serialize(message).toBytes(),\n\t\t\tsignature,\n\t\t\t'PersonalMessage',\n\t\t);\n\t}\n\n\t/**\n\t * Verifies that the signature is valid for for the provided Transaction\n\t */\n\tverifyTransaction(transaction: Uint8Array, signature: Uint8Array | string): Promise<boolean> {\n\t\treturn this.verifyWithIntent(transaction, signature, 'TransactionData');\n\t}\n\n\t/**\n\t * Returns the bytes representation of the public key\n\t * prefixed with the signature scheme flag\n\t */\n\ttoSuiBytes(): Uint8Array {\n\t\tconst rawBytes = this.toRawBytes();\n\t\tconst suiBytes = new Uint8Array(rawBytes.length + 1);\n\t\tsuiBytes.set([this.flag()]);\n\t\tsuiBytes.set(rawBytes, 1);\n\n\t\treturn suiBytes;\n\t}\n\n\t/**\n\t * Return the Sui address associated with this Ed25519 public key\n\t */\n\ttoSuiAddress(): string {\n\t\t// Each hex char represents half a byte, hence hex address doubles the length\n\t\treturn normalizeSuiAddress(\n\t\t\tbytesToHex(blake2b(this.toSuiBytes(), { dkLen: 32 })).slice(0, SUI_ADDRESS_LENGTH * 2),\n\t\t);\n\t}\n\n\t/**\n\t * Return the byte array representation of the public key\n\t */\n\tabstract toRawBytes(): Uint8Array;\n\n\t/**\n\t * Return signature scheme flag of the public key\n\t */\n\tabstract flag(): number;\n\n\t/**\n\t * Verifies that the signature is valid for for the provided message\n\t */\n\tabstract verify(data: Uint8Array, signature: Uint8Array | string): Promise<boolean>;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAyB;AACzB,qBAAwB;AACxB,mBAA2B;AAE3B,IAAAA,cAAoB;AACpB,uBAAwD;AAExD,oBAAkC;AAO3B,SAAS,WAAW,GAAe,GAAe;AACxD,MAAI,MAAM,EAAG,QAAO;AAEpB,MAAI,EAAE,WAAW,EAAE,QAAQ;AAC1B,WAAO;AAAA,EACR;AAEA,WAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;AAClC,QAAI,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG;AAClB,aAAO;AAAA,IACR;AAAA,EACD;AACA,SAAO;AACR;AAKO,MAAe,UAAU;AAAA;AAAA;AAAA;AAAA,EAI/B,OAAO,WAAsB;AAC5B,WAAO,WAAW,KAAK,WAAW,GAAG,UAAU,WAAW,CAAC;AAAA,EAC5D;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW;AACV,eAAO,qBAAS,KAAK,WAAW,CAAC;AAAA,EAClC;AAAA,EAEA,WAAkB;AACjB,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,iBAAyB;AACxB,UAAM,QAAQ,KAAK,WAAW;AAC9B,eAAO,qBAAS,KAAK;AAAA,EACtB;AAAA,EAEA,iBACC,OACA,WACA,QACmB;AACnB,UAAM,oBAAgB,iCAAkB,QAAQ,KAAK;AACrD,UAAM,aAAS,wBAAQ,eAAe,EAAE,OAAO,GAAG,CAAC;AAEnD,WAAO,KAAK,OAAO,QAAQ,SAAS;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,sBAAsB,SAAqB,WAAkD;AAC5F,WAAO,KAAK;AAAA,MACX,gBAAI,OAAO,gBAAI,GAAG,CAAC,EAAE,UAAU,OAAO,EAAE,QAAQ;AAAA,MAChD;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAKA,kBAAkB,aAAyB,WAAkD;AAC5F,WAAO,KAAK,iBAAiB,aAAa,WAAW,iBAAiB;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,aAAyB;AACxB,UAAM,WAAW,KAAK,WAAW;AACjC,UAAM,WAAW,IAAI,WAAW,SAAS,SAAS,CAAC;AACnD,aAAS,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAC1B,aAAS,IAAI,UAAU,CAAC;AAExB,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,eAAuB;AAEtB,eAAO;AAAA,UACN,6BAAW,wBAAQ,KAAK,WAAW,GAAG,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,sCAAqB,CAAC;AAAA,IACtF;AAAA,EACD;AAgBD;",
6
6
  "names": ["import_bcs"]
7
7
  }
@@ -39,10 +39,10 @@ function toSerializedSignature({
39
39
  serializedSignature.set([import_signature_scheme.SIGNATURE_SCHEME_TO_FLAG[signatureScheme]]);
40
40
  serializedSignature.set(signature, 1);
41
41
  serializedSignature.set(pubKeyBytes, 1 + signature.length);
42
- return (0, import_bcs.toB64)(serializedSignature);
42
+ return (0, import_bcs.toBase64)(serializedSignature);
43
43
  }
44
44
  function parseSerializedSignature(serializedSignature) {
45
- const bytes = (0, import_bcs.fromB64)(serializedSignature);
45
+ const bytes = (0, import_bcs.fromBase64)(serializedSignature);
46
46
  const signatureScheme = import_signature_scheme.SIGNATURE_FLAG_TO_SCHEME[bytes[0]];
47
47
  switch (signatureScheme) {
48
48
  case "MultiSig":
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cryptography/signature.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromB64, toB64 } from '@mysten/bcs';\n\nimport { bcs } from '../bcs/index.js';\nimport type { MultiSigStruct } from '../multisig/publickey.js';\nimport { parseSerializedZkLoginSignature } from '../zklogin/publickey.js';\nimport type { PublicKey } from './publickey.js';\nimport type { SignatureScheme } from './signature-scheme.js';\nimport {\n\tSIGNATURE_FLAG_TO_SCHEME,\n\tSIGNATURE_SCHEME_TO_FLAG,\n\tSIGNATURE_SCHEME_TO_SIZE,\n} from './signature-scheme.js';\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SerializeSignatureInput = {\n\tsignatureScheme: SignatureScheme;\n\t/** Base64-encoded signature */\n\tsignature: Uint8Array;\n\t/** Base64-encoded public key */\n\tpublicKey?: PublicKey;\n};\n\n/**\n * Takes in a signature, its associated signing scheme and a public key, then serializes this data\n */\nexport function toSerializedSignature({\n\tsignature,\n\tsignatureScheme,\n\tpublicKey,\n}: SerializeSignatureInput): string {\n\tif (!publicKey) {\n\t\tthrow new Error('`publicKey` is required');\n\t}\n\n\tconst pubKeyBytes = publicKey.toRawBytes();\n\tconst serializedSignature = new Uint8Array(1 + signature.length + pubKeyBytes.length);\n\tserializedSignature.set([SIGNATURE_SCHEME_TO_FLAG[signatureScheme]]);\n\tserializedSignature.set(signature, 1);\n\tserializedSignature.set(pubKeyBytes, 1 + signature.length);\n\treturn toB64(serializedSignature);\n}\n\n/**\n * Decodes a serialized signature into its constituent components: the signature scheme, the actual signature, and the public key\n */\nexport function parseSerializedSignature(serializedSignature: string) {\n\tconst bytes = fromB64(serializedSignature);\n\n\tconst signatureScheme =\n\t\tSIGNATURE_FLAG_TO_SCHEME[bytes[0] as keyof typeof SIGNATURE_FLAG_TO_SCHEME];\n\n\tswitch (signatureScheme) {\n\t\tcase 'MultiSig':\n\t\t\tconst multisig: MultiSigStruct = bcs.MultiSig.parse(bytes.slice(1));\n\t\t\treturn {\n\t\t\t\tserializedSignature,\n\t\t\t\tsignatureScheme,\n\t\t\t\tmultisig,\n\t\t\t\tbytes,\n\t\t\t};\n\t\tcase 'ZkLogin':\n\t\t\treturn parseSerializedZkLoginSignature(serializedSignature);\n\t\tcase 'ED25519':\n\t\tcase 'Secp256k1':\n\t\tcase 'Secp256r1':\n\t\t\tconst size =\n\t\t\t\tSIGNATURE_SCHEME_TO_SIZE[signatureScheme as keyof typeof SIGNATURE_SCHEME_TO_SIZE];\n\t\t\tconst signature = bytes.slice(1, bytes.length - size);\n\t\t\tconst publicKey = bytes.slice(1 + signature.length);\n\n\t\t\treturn {\n\t\t\t\tserializedSignature,\n\t\t\t\tsignatureScheme,\n\t\t\t\tsignature,\n\t\t\t\tpublicKey,\n\t\t\t\tbytes,\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new Error('Unsupported signature scheme');\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA+B;AAE/B,IAAAA,cAAoB;AAEpB,uBAAgD;AAGhD,8BAIO;AAgBA,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,GAAoC;AACnC,MAAI,CAAC,WAAW;AACf,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AAEA,QAAM,cAAc,UAAU,WAAW;AACzC,QAAM,sBAAsB,IAAI,WAAW,IAAI,UAAU,SAAS,YAAY,MAAM;AACpF,sBAAoB,IAAI,CAAC,iDAAyB,eAAe,CAAC,CAAC;AACnE,sBAAoB,IAAI,WAAW,CAAC;AACpC,sBAAoB,IAAI,aAAa,IAAI,UAAU,MAAM;AACzD,aAAO,kBAAM,mBAAmB;AACjC;AAKO,SAAS,yBAAyB,qBAA6B;AACrE,QAAM,YAAQ,oBAAQ,mBAAmB;AAEzC,QAAM,kBACL,iDAAyB,MAAM,CAAC,CAA0C;AAE3E,UAAQ,iBAAiB;AAAA,IACxB,KAAK;AACJ,YAAM,WAA2B,gBAAI,SAAS,MAAM,MAAM,MAAM,CAAC,CAAC;AAClE,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD,KAAK;AACJ,iBAAO,kDAAgC,mBAAmB;AAAA,IAC3D,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACJ,YAAM,OACL,iDAAyB,eAAwD;AAClF,YAAM,YAAY,MAAM,MAAM,GAAG,MAAM,SAAS,IAAI;AACpD,YAAM,YAAY,MAAM,MAAM,IAAI,UAAU,MAAM;AAElD,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD;AACC,YAAM,IAAI,MAAM,8BAA8B;AAAA,EAChD;AACD;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromBase64, toBase64 } from '@mysten/bcs';\n\nimport { bcs } from '../bcs/index.js';\nimport type { MultiSigStruct } from '../multisig/publickey.js';\nimport { parseSerializedZkLoginSignature } from '../zklogin/publickey.js';\nimport type { PublicKey } from './publickey.js';\nimport type { SignatureScheme } from './signature-scheme.js';\nimport {\n\tSIGNATURE_FLAG_TO_SCHEME,\n\tSIGNATURE_SCHEME_TO_FLAG,\n\tSIGNATURE_SCHEME_TO_SIZE,\n} from './signature-scheme.js';\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SerializeSignatureInput = {\n\tsignatureScheme: SignatureScheme;\n\t/** Base64-encoded signature */\n\tsignature: Uint8Array;\n\t/** Base64-encoded public key */\n\tpublicKey?: PublicKey;\n};\n\n/**\n * Takes in a signature, its associated signing scheme and a public key, then serializes this data\n */\nexport function toSerializedSignature({\n\tsignature,\n\tsignatureScheme,\n\tpublicKey,\n}: SerializeSignatureInput): string {\n\tif (!publicKey) {\n\t\tthrow new Error('`publicKey` is required');\n\t}\n\n\tconst pubKeyBytes = publicKey.toRawBytes();\n\tconst serializedSignature = new Uint8Array(1 + signature.length + pubKeyBytes.length);\n\tserializedSignature.set([SIGNATURE_SCHEME_TO_FLAG[signatureScheme]]);\n\tserializedSignature.set(signature, 1);\n\tserializedSignature.set(pubKeyBytes, 1 + signature.length);\n\treturn toBase64(serializedSignature);\n}\n\n/**\n * Decodes a serialized signature into its constituent components: the signature scheme, the actual signature, and the public key\n */\nexport function parseSerializedSignature(serializedSignature: string) {\n\tconst bytes = fromBase64(serializedSignature);\n\n\tconst signatureScheme =\n\t\tSIGNATURE_FLAG_TO_SCHEME[bytes[0] as keyof typeof SIGNATURE_FLAG_TO_SCHEME];\n\n\tswitch (signatureScheme) {\n\t\tcase 'MultiSig':\n\t\t\tconst multisig: MultiSigStruct = bcs.MultiSig.parse(bytes.slice(1));\n\t\t\treturn {\n\t\t\t\tserializedSignature,\n\t\t\t\tsignatureScheme,\n\t\t\t\tmultisig,\n\t\t\t\tbytes,\n\t\t\t};\n\t\tcase 'ZkLogin':\n\t\t\treturn parseSerializedZkLoginSignature(serializedSignature);\n\t\tcase 'ED25519':\n\t\tcase 'Secp256k1':\n\t\tcase 'Secp256r1':\n\t\t\tconst size =\n\t\t\t\tSIGNATURE_SCHEME_TO_SIZE[signatureScheme as keyof typeof SIGNATURE_SCHEME_TO_SIZE];\n\t\t\tconst signature = bytes.slice(1, bytes.length - size);\n\t\t\tconst publicKey = bytes.slice(1 + signature.length);\n\n\t\t\treturn {\n\t\t\t\tserializedSignature,\n\t\t\t\tsignatureScheme,\n\t\t\t\tsignature,\n\t\t\t\tpublicKey,\n\t\t\t\tbytes,\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new Error('Unsupported signature scheme');\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAqC;AAErC,IAAAA,cAAoB;AAEpB,uBAAgD;AAGhD,8BAIO;AAgBA,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACD,GAAoC;AACnC,MAAI,CAAC,WAAW;AACf,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AAEA,QAAM,cAAc,UAAU,WAAW;AACzC,QAAM,sBAAsB,IAAI,WAAW,IAAI,UAAU,SAAS,YAAY,MAAM;AACpF,sBAAoB,IAAI,CAAC,iDAAyB,eAAe,CAAC,CAAC;AACnE,sBAAoB,IAAI,WAAW,CAAC;AACpC,sBAAoB,IAAI,aAAa,IAAI,UAAU,MAAM;AACzD,aAAO,qBAAS,mBAAmB;AACpC;AAKO,SAAS,yBAAyB,qBAA6B;AACrE,QAAM,YAAQ,uBAAW,mBAAmB;AAE5C,QAAM,kBACL,iDAAyB,MAAM,CAAC,CAA0C;AAE3E,UAAQ,iBAAiB;AAAA,IACxB,KAAK;AACJ,YAAM,WAA2B,gBAAI,SAAS,MAAM,MAAM,MAAM,CAAC,CAAC;AAClE,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD,KAAK;AACJ,iBAAO,kDAAgC,mBAAmB;AAAA,IAC3D,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACJ,YAAM,OACL,iDAAyB,eAAwD;AAClF,YAAM,YAAY,MAAM,MAAM,GAAG,MAAM,SAAS,IAAI;AACpD,YAAM,YAAY,MAAM,MAAM,IAAI,UAAU,MAAM;AAElD,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD;AACC,YAAM,IAAI,MAAM,8BAA8B;AAAA,EAChD;AACD;",
6
6
  "names": ["import_bcs"]
7
7
  }