@umbra-privacy/sdk 3.0.0 → 4.0.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.
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -251,21 +251,21 @@ interface GetUmbraClientArgs {
|
|
|
251
251
|
* Whether to defer the master seed signing prompt to first use.
|
|
252
252
|
*
|
|
253
253
|
* @remarks
|
|
254
|
-
* When `
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
254
|
+
* When `false` (the default), the factory awaits master seed derivation
|
|
255
|
+
* before resolving. The wallet signing prompt fires immediately during
|
|
256
|
+
* construction so that by the time the returned `Promise` resolves, the
|
|
257
|
+
* master seed is already cached and no further wallet prompts will occur
|
|
258
|
+
* for key derivation.
|
|
258
259
|
*
|
|
259
|
-
* When `
|
|
260
|
-
*
|
|
261
|
-
* the
|
|
262
|
-
*
|
|
260
|
+
* When `true`, `getUmbraClient` resolves immediately without prompting
|
|
261
|
+
* the wallet. The signing prompt for master seed derivation fires lazily
|
|
262
|
+
* on the first call to `client.masterSeed.getMasterSeed()`, which occurs
|
|
263
|
+
* automatically the first time any service function needs a derived key.
|
|
263
264
|
*
|
|
264
|
-
* Use `
|
|
265
|
-
*
|
|
266
|
-
* unexpected signing interruptions.
|
|
265
|
+
* Use `true` when you want the client to be available instantly (e.g. at
|
|
266
|
+
* wallet connect time) and defer the signing prompt to the first operation.
|
|
267
267
|
*
|
|
268
|
-
* @defaultValue `
|
|
268
|
+
* @defaultValue `false`
|
|
269
269
|
*/
|
|
270
270
|
readonly deferMasterSeedSignature?: boolean;
|
|
271
271
|
}
|
|
@@ -427,7 +427,7 @@ declare function getUmbraClient(args: GetUmbraClientArgs, deps?: GetUmbraClientD
|
|
|
427
427
|
*
|
|
428
428
|
* @public
|
|
429
429
|
*/
|
|
430
|
-
declare const UMBRA_MESSAGE_TO_SIGN = "
|
|
430
|
+
declare const UMBRA_MESSAGE_TO_SIGN = "\nUmbra Protocol \u2013 User Consent & Acknowledgement\n\nPlease read carefully before continuing. Umbra is a non-custodial, open-source protocol. Umbra does not hold, control, manage, or access your digital assets, private keys, viewing keys, transactions, or personal data. All interactions with the Umbra protocol occur through autonomous smart contracts and wallet-signed transactions executed directly on the blockchain.\n\nBy using the Umbra protocol, you acknowledge and agree that:\n\n1. You are solely responsible for managing your wallet, private keys, privacy settings, viewing key disclosures, and any transactions or interactions you authorize.\n2.Blockchain transactions are generally irreversible, and smart contracts may contain bugs, vulnerabilities, or unintended behavior.\n3. Errors, misuse, misconfiguration, third-party tools, relayers, or loss of keys may result in permanent and unrecoverable loss of assets or privacy.\n4. Privacy features are designed to enhance confidentiality but do not guarantee absolute or unconditional anonymity.\n5. Transactions may involve independent relayers or third-party infrastructure that Umbra does not operate, control, or supervise.\n6. By clicking \"I Agree\", you confirm that you have read, understood, and accepted all applicable terms, policies, risk disclosures, notices, and other documentation governing your access to and use of the Umbra protocol, as published or made available by Umbra from time to time.\nYou acknowledge that such documentation may be updated or modified, and that continued access to or use of the Umbra Protocol constitutes acceptance of the then-current versions. If you do not agree, do not proceed and discontinue use of the Umbra protocol.\n";
|
|
431
431
|
/**
|
|
432
432
|
* Offset discriminators used when deriving PDAs for fee-related on-chain accounts.
|
|
433
433
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -251,21 +251,21 @@ interface GetUmbraClientArgs {
|
|
|
251
251
|
* Whether to defer the master seed signing prompt to first use.
|
|
252
252
|
*
|
|
253
253
|
* @remarks
|
|
254
|
-
* When `
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
254
|
+
* When `false` (the default), the factory awaits master seed derivation
|
|
255
|
+
* before resolving. The wallet signing prompt fires immediately during
|
|
256
|
+
* construction so that by the time the returned `Promise` resolves, the
|
|
257
|
+
* master seed is already cached and no further wallet prompts will occur
|
|
258
|
+
* for key derivation.
|
|
258
259
|
*
|
|
259
|
-
* When `
|
|
260
|
-
*
|
|
261
|
-
* the
|
|
262
|
-
*
|
|
260
|
+
* When `true`, `getUmbraClient` resolves immediately without prompting
|
|
261
|
+
* the wallet. The signing prompt for master seed derivation fires lazily
|
|
262
|
+
* on the first call to `client.masterSeed.getMasterSeed()`, which occurs
|
|
263
|
+
* automatically the first time any service function needs a derived key.
|
|
263
264
|
*
|
|
264
|
-
* Use `
|
|
265
|
-
*
|
|
266
|
-
* unexpected signing interruptions.
|
|
265
|
+
* Use `true` when you want the client to be available instantly (e.g. at
|
|
266
|
+
* wallet connect time) and defer the signing prompt to the first operation.
|
|
267
267
|
*
|
|
268
|
-
* @defaultValue `
|
|
268
|
+
* @defaultValue `false`
|
|
269
269
|
*/
|
|
270
270
|
readonly deferMasterSeedSignature?: boolean;
|
|
271
271
|
}
|
|
@@ -427,7 +427,7 @@ declare function getUmbraClient(args: GetUmbraClientArgs, deps?: GetUmbraClientD
|
|
|
427
427
|
*
|
|
428
428
|
* @public
|
|
429
429
|
*/
|
|
430
|
-
declare const UMBRA_MESSAGE_TO_SIGN = "
|
|
430
|
+
declare const UMBRA_MESSAGE_TO_SIGN = "\nUmbra Protocol \u2013 User Consent & Acknowledgement\n\nPlease read carefully before continuing. Umbra is a non-custodial, open-source protocol. Umbra does not hold, control, manage, or access your digital assets, private keys, viewing keys, transactions, or personal data. All interactions with the Umbra protocol occur through autonomous smart contracts and wallet-signed transactions executed directly on the blockchain.\n\nBy using the Umbra protocol, you acknowledge and agree that:\n\n1. You are solely responsible for managing your wallet, private keys, privacy settings, viewing key disclosures, and any transactions or interactions you authorize.\n2.Blockchain transactions are generally irreversible, and smart contracts may contain bugs, vulnerabilities, or unintended behavior.\n3. Errors, misuse, misconfiguration, third-party tools, relayers, or loss of keys may result in permanent and unrecoverable loss of assets or privacy.\n4. Privacy features are designed to enhance confidentiality but do not guarantee absolute or unconditional anonymity.\n5. Transactions may involve independent relayers or third-party infrastructure that Umbra does not operate, control, or supervise.\n6. By clicking \"I Agree\", you confirm that you have read, understood, and accepted all applicable terms, policies, risk disclosures, notices, and other documentation governing your access to and use of the Umbra protocol, as published or made available by Umbra from time to time.\nYou acknowledge that such documentation may be updated or modified, and that continued access to or use of the Umbra Protocol constitutes acceptance of the then-current versions. If you do not agree, do not proceed and discontinue use of the Umbra protocol.\n";
|
|
431
431
|
/**
|
|
432
432
|
* Offset discriminators used when deriving PDAs for fee-related on-chain accounts.
|
|
433
433
|
*
|
package/dist/index.js
CHANGED
|
@@ -29,20 +29,21 @@ import { keccak_256 } from '@noble/hashes/sha3.js';
|
|
|
29
29
|
import { getCreateUserGrantInstructionAsync, getDeleteUserGrantInstructionAsync, getReencryptUserGrantV11InstructionAsync, getReencryptNetworkGrantForNetworkBalanceV11InstructionAsync, getReencryptNetworkGrantForSharedBalanceV11InstructionAsync, decodeEncryptedTokenAccount, getConvertNetworkBalanceToSharedBalanceV11InstructionAsync, getReencryptSharedBalanceV11InstructionAsync, decodeEncryptedUserAccount, getResetSharedEncryptedTokenAccountQueueV11InstructionAsync, getResetNetworkEncryptedTokenAccountQueueV11InstructionAsync, getDepositFromPublicBalanceIntoExistingSharedBalanceV11InstructionAsync, getDepositFromPublicBalanceIntoNewSharedBalanceV11InstructionAsync, getDepositFromPublicBalanceIntoExistingNetworkBalanceV11InstructionAsync, getDepositFromPublicBalanceIntoNewNetworkBalanceV11InstructionAsync, getCloseStealthPoolDepositInputBufferInstructionAsync, getCreateStealthPoolDepositInputBufferInstructionAsync, getDepositIntoStealthPoolFromSharedBalanceV11InstructionAsync, getClosePublicStealthPoolDepositInputBufferInstructionAsync, getCreatePublicStealthPoolDepositInputBufferInstructionAsync, getDepositIntoStealthPoolFromPublicBalanceInstructionAsync, getClaimStagedSolFromPoolInstructionAsync, getClaimStagedSplFromPoolInstructionAsync, getEncryptedUserAccountSize, ENCRYPTED_USER_ACCOUNT_DISCRIMINATOR, getInitialiseEncryptedUserAccountInstructionAsync, getRegisterTokenPublicKeyInstructionAsync, getRegisterUserForAnonymousUsageV11InstructionAsync, getUpdateRandomGenerationSeedInstructionAsync, getUpdateTokenAccountRandomGenerationSeedInstructionAsync, getWithdrawFromSharedBalanceIntoPublicBalanceV11InstructionAsync } from '@umbra-privacy/umbra-codama';
|
|
30
30
|
|
|
31
31
|
// src/umbra/constants.ts
|
|
32
|
-
var UMBRA_MESSAGE_TO_SIGN = `
|
|
32
|
+
var UMBRA_MESSAGE_TO_SIGN = `
|
|
33
|
+
Umbra Protocol – User Consent & Acknowledgement
|
|
33
34
|
|
|
34
35
|
Please read carefully before continuing. Umbra is a non-custodial, open-source protocol. Umbra does not hold, control, manage, or access your digital assets, private keys, viewing keys, transactions, or personal data. All interactions with the Umbra protocol occur through autonomous smart contracts and wallet-signed transactions executed directly on the blockchain.
|
|
35
36
|
|
|
36
37
|
By using the Umbra protocol, you acknowledge and agree that:
|
|
37
38
|
|
|
38
39
|
1. You are solely responsible for managing your wallet, private keys, privacy settings, viewing key disclosures, and any transactions or interactions you authorize.
|
|
39
|
-
2.
|
|
40
|
+
2.Blockchain transactions are generally irreversible, and smart contracts may contain bugs, vulnerabilities, or unintended behavior.
|
|
40
41
|
3. Errors, misuse, misconfiguration, third-party tools, relayers, or loss of keys may result in permanent and unrecoverable loss of assets or privacy.
|
|
41
42
|
4. Privacy features are designed to enhance confidentiality but do not guarantee absolute or unconditional anonymity.
|
|
42
43
|
5. Transactions may involve independent relayers or third-party infrastructure that Umbra does not operate, control, or supervise.
|
|
43
44
|
6. By clicking "I Agree", you confirm that you have read, understood, and accepted all applicable terms, policies, risk disclosures, notices, and other documentation governing your access to and use of the Umbra protocol, as published or made available by Umbra from time to time.
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
You acknowledge that such documentation may be updated or modified, and that continued access to or use of the Umbra Protocol constitutes acceptance of the then-current versions. If you do not agree, do not proceed and discontinue use of the Umbra protocol.
|
|
46
|
+
`;
|
|
46
47
|
var FEE_OFFSETS = {
|
|
47
48
|
/**
|
|
48
49
|
* Offset used in `FeeVault` PDA derivation for the unified protocol fees pool.
|