@sig-net/midnight-contract-deploy 0.26.0-rc.1 → 0.26.0-rc.2
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/README.md +14 -11
- package/dist/deploy-protocol-contract.d.ts +67 -0
- package/dist/deploy-protocol-contract.d.ts.map +1 -0
- package/dist/deploy-protocol-contract.js +94 -0
- package/dist/deploy-protocol-contract.js.map +1 -0
- package/dist/deploy-signet-contract.d.ts +5 -40
- package/dist/deploy-signet-contract.d.ts.map +1 -1
- package/dist/deploy-signet-contract.js +11 -78
- package/dist/deploy-signet-contract.js.map +1 -1
- package/dist/deploy-signet-responder.d.ts +19 -0
- package/dist/deploy-signet-responder.d.ts.map +1 -0
- package/dist/deploy-signet-responder.js +27 -0
- package/dist/deploy-signet-responder.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/plumbing/wallet.d.ts.map +1 -1
- package/dist/plumbing/wallet.js +4 -17
- package/dist/plumbing/wallet.js.map +1 -1
- package/dist/signet-responder-binding.d.ts +11 -0
- package/dist/signet-responder-binding.d.ts.map +1 -0
- package/dist/signet-responder-binding.js +24 -0
- package/dist/signet-responder-binding.js.map +1 -0
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @sig-net/midnight-contract-deploy
|
|
2
2
|
|
|
3
|
-
Deploy tooling for the
|
|
3
|
+
Deploy tooling for the [Sig Network](https://sig.network) protocol contracts on the [Midnight blockchain](https://midnight.network), the central signet contract and the signet responder, self-contained for npm:
|
|
4
4
|
|
|
5
|
-
- **The operator deploy
|
|
6
|
-
- **The Node
|
|
5
|
+
- **The operator deploy flows** (`deploySignetContract`, `deploySignetResponder`): build, balance, prove and submit the contract's deploy transaction through a synced wallet, using the compiled assets shipped in [`@sig-net/midnight-contract`](https://www.npmjs.com/package/@sig-net/midnight-contract) or [`@sig-net/midnight-responder`](https://www.npmjs.com/package/@sig-net/midnight-responder).
|
|
6
|
+
- **The Node bindings** of `@sig-net/midnight-contract` and `@sig-net/midnight-responder` to their compiled assets (zk config, private state).
|
|
7
7
|
- **Generic deploy/wallet plumbing** any Compact contract's deploy script composes: network config, seed parsing and key derivation, the wallet facade lifecycle, funding primitives (a root wallet funds role wallets and registers NIGHT for dust generation), and unproven-transaction build/submit.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
@@ -25,35 +25,38 @@ Everything is read from the environment:
|
|
|
25
25
|
| `MPC_SECP256K1_PUBKEY` | Optional on a deployed network: the MPC root public key a requester's derived accounts start from, in SEC1 hex or NEAR `secp256k1:<base58>` form. `resolveMpcRootPublicKey` takes the key `@sig-net/midnight` publishes for the network when it is unset, refuses a set value that disagrees with it, and returns `0x04…` uncompressed hex either way. |
|
|
26
26
|
| `MIDNIGHT_FAUCET_URL` | The faucet named in the unfunded-wallet hint. Built in per network: stagenet `https://faucet.stagenet.shielded.tools`, preview `https://midnight-tmnight-preview.nethermind.dev`, preprod `https://midnight-tmnight-preprod.nethermind.dev`. Set it to override one of those, or to name a faucet for a network without one. |
|
|
27
27
|
|
|
28
|
-
In a checkout of the [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration) repository, `yarn deploy:signet-contract` also
|
|
28
|
+
In a checkout of the [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration) repository, `yarn deploy:signet-contract` and `yarn deploy:signet-responder` also load the repository root's `.env` file whenever one exists. A variable already set in the shell takes precedence over the same key in the file.
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
import { deploySignetContract } from "@sig-net/midnight-contract-deploy";
|
|
33
|
+
import { deploySignetContract, deploySignetResponder } from "@sig-net/midnight-contract-deploy";
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const singleton = await deploySignetContract(process.env);
|
|
36
|
+
const responder = await deploySignetResponder(process.env);
|
|
36
37
|
```
|
|
37
38
|
|
|
39
|
+
Each returns the deployed `contractAddress` and the deploy transaction's `txId`.
|
|
40
|
+
|
|
38
41
|
The generic plumbing (network config, wallets, funding, transaction submission) is exported from the package root as well, for deploy scripts of other Compact contracts.
|
|
39
42
|
|
|
40
|
-
A pipeline that touches several wallets, or one wallet several times, holds them in a `WalletRegistry`: the first request for a seed builds, starts and fully syncs its facade (on a deployed network a fresh facade scans the chain from nothing, and the sync logs a heartbeat with each sub-wallet's position every ten seconds), every later request returns the same running facade, and `close()` stops them all once. `deploySignetContract(env, wallets)` and the funding primitives (`assertRootFunded`, `readAccountFunding`, `fundChildFromRoot`) take the registry. Without one,
|
|
43
|
+
A pipeline that touches several wallets, or one wallet several times, holds them in a `WalletRegistry`: the first request for a seed builds, starts and fully syncs its facade (on a deployed network a fresh facade scans the chain from nothing, and the sync logs a heartbeat with each sub-wallet's position every ten seconds), every later request returns the same running facade, and `close()` stops them all once. `deploySignetContract(env, wallets)`, `deploySignetResponder(env, wallets)` and the funding primitives (`assertRootFunded`, `readAccountFunding`, `fundChildFromRoot`) take the registry. Without one, each deploy flow opens a private registry for its single wallet and closes it after.
|
|
41
44
|
|
|
42
45
|
## Deploying from CI
|
|
43
46
|
|
|
44
|
-
The [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration) repository deploys the singleton through its manually dispatched `deploy` workflow, which picks a network and a release tag and runs
|
|
47
|
+
The [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration) repository deploys the singleton and the responder through its manually dispatched `deploy` workflow, which picks a contract, a network and a release tag and runs that contract's flow on a runner with a local proof server.
|
|
45
48
|
|
|
46
49
|
- **The wallet needs faucet-funded NIGHT and nothing else.** The flow registers that NIGHT for dust generation and waits for the first spendable DUST, so a freshly funded seed works on the first run. A run whose wallet holds no NIGHT yet fails printing the wallet's NIGHT receive address (`mn_addr…`) and the network's faucet URL, ready to paste into the faucet.
|
|
47
|
-
- **The deployed address is recorded by a bot PR.** The workflow writes it into the `signetContractAddresses`
|
|
50
|
+
- **The deployed address is recorded by a bot PR.** The workflow writes it into the contract's address table (`signetContractAddresses` or `responderContractAddresses`) of [`@sig-net/midnight`](https://www.npmjs.com/package/@sig-net/midnight) and opens a pull request into the branch the workflow was dispatched from, so a human reviews the address before it ships to npm consumers.
|
|
48
51
|
- **A deploy sets NO contract maintenance authority.** The maintenance signing key is sampled and dropped, so a deployed contract can never be updated: every run creates a fresh, permanent contract instance, and moving forward means a new deployment while the existing contracts stay exactly as they are.
|
|
49
52
|
|
|
50
53
|
## Documentation
|
|
51
54
|
|
|
52
|
-
The deployed
|
|
55
|
+
The deployed contracts are the singleton and the responder of the [sign bidirectional flow](https://github.com/sig-net/midnight-integration/blob/main/README.md#sign-bidirectional-protocol-flow), documented in the [sig-net/midnight-integration README](https://github.com/sig-net/midnight-integration/blob/main/README.md).
|
|
53
56
|
|
|
54
57
|
## Related packages
|
|
55
58
|
|
|
56
|
-
- [`@sig-net/midnight-contract`](https://www.npmjs.com/package/@sig-net/midnight-contract): the
|
|
59
|
+
- [`@sig-net/midnight-contract`](https://www.npmjs.com/package/@sig-net/midnight-contract) and [`@sig-net/midnight-responder`](https://www.npmjs.com/package/@sig-net/midnight-responder): the contracts this package deploys.
|
|
57
60
|
- [`@sig-net/midnight`](https://www.npmjs.com/package/@sig-net/midnight): the client-agnostic protocol library.
|
|
58
61
|
|
|
59
62
|
Developed in [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration). Example applications live in [sig-net/midnight-examples](https://github.com/sig-net/midnight-examples).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type DeployTransaction } from "./plumbing/deploy.ts";
|
|
2
|
+
import { type MidnightNodeConfig } from "./plumbing/midnight-node-config.ts";
|
|
3
|
+
import type { NetworkId } from "./plumbing/network-id.ts";
|
|
4
|
+
import { type TransactionIdentifier, WalletRegistry } from "./plumbing/wallet.ts";
|
|
5
|
+
/** The outcome of a successful contract deployment. */
|
|
6
|
+
export interface ContractDeployment {
|
|
7
|
+
/** Address of the deployed contract on Midnight. */
|
|
8
|
+
contractAddress: string;
|
|
9
|
+
/** Identifier of the submitted deploy transaction. */
|
|
10
|
+
txId: TransactionIdentifier;
|
|
11
|
+
}
|
|
12
|
+
/** Where a deploy setting's effective value came from. */
|
|
13
|
+
export declare enum DeploySettingSource {
|
|
14
|
+
/** The environment variable is set. */
|
|
15
|
+
Environment = "environment",
|
|
16
|
+
/** The variable is unset or blank, so the built-in value applies. */
|
|
17
|
+
Default = "default"
|
|
18
|
+
}
|
|
19
|
+
/** One row of {@link deployEnvironmentTable}. */
|
|
20
|
+
export interface DeploySettingRow {
|
|
21
|
+
/** The value the deploy runs with. */
|
|
22
|
+
value: string;
|
|
23
|
+
/** Whether the environment or the built-in default supplied {@link value}. */
|
|
24
|
+
source: DeploySettingSource;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Tabulate every environment variable {@link deployProtocolContract} runs
|
|
28
|
+
* with, except the secret `DEPLOYER_SEED`, each with its effective value.
|
|
29
|
+
*
|
|
30
|
+
* @param env - The environment the deploy reads.
|
|
31
|
+
* @param midnightNodeConfig - The node config resolved from `env`.
|
|
32
|
+
* @returns One row per variable, keyed by variable name.
|
|
33
|
+
*/
|
|
34
|
+
export declare function deployEnvironmentTable(env: Record<string, string | undefined>, midnightNodeConfig: MidnightNodeConfig): Record<string, DeploySettingRow>;
|
|
35
|
+
/**
|
|
36
|
+
* Build one contract's unproven deploy transaction, typically a
|
|
37
|
+
* `buildDeployTransaction` call over the contract's compiled assets.
|
|
38
|
+
*
|
|
39
|
+
* @param networkId - The network the transaction targets.
|
|
40
|
+
* @param coinPublicKeyHex - The deploying wallet's Zswap coin public key (hex).
|
|
41
|
+
* @returns The contract address and the serialized unproven transaction.
|
|
42
|
+
*/
|
|
43
|
+
export type DeployTransactionBuilder = (networkId: NetworkId, coinPublicKeyHex: string) => Promise<DeployTransaction>;
|
|
44
|
+
/**
|
|
45
|
+
* Deploy a protocol contract: read config from `env`, build and prove the deploy
|
|
46
|
+
* transaction and submit it through a synced wallet. Progress is logged to
|
|
47
|
+
* the console, ending with `deployed <name> at <address>`, the line the
|
|
48
|
+
* deploy workflow reads the address from. Any funded wallet can deploy, and
|
|
49
|
+
* nothing about the deployer is sealed. The wallet needs NIGHT only:
|
|
50
|
+
* {@link ensureFeeReady} registers it for dust generation and waits for the
|
|
51
|
+
* deploy transaction's fee in spendable DUST when the wallet holds less.
|
|
52
|
+
*
|
|
53
|
+
* @param name - The contract's package directory name, for the log.
|
|
54
|
+
* @param buildTransaction - Builds the contract's deploy transaction.
|
|
55
|
+
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
56
|
+
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
57
|
+
* @param wallets - A registry to take the deployer wallet from, when the caller
|
|
58
|
+
* keeps wallets open across steps. Without one, a private registry is opened
|
|
59
|
+
* for this deploy and closed after it.
|
|
60
|
+
* @returns The deployed contract address and deploy transaction id.
|
|
61
|
+
* @throws {WalletUnfundedError} If the deployer wallet holds no NIGHT and
|
|
62
|
+
* less DUST than the deploy fee: the error carries the wallet's NIGHT receive address to fund.
|
|
63
|
+
* @throws {Error} If the deploy's fee does not generate in spendable DUST after
|
|
64
|
+
* registering the wallet's NIGHT, or submission fails.
|
|
65
|
+
*/
|
|
66
|
+
export declare function deployProtocolContract(name: string, buildTransaction: DeployTransactionBuilder, env: Record<string, string | undefined>, wallets?: WalletRegistry): Promise<ContractDeployment>;
|
|
67
|
+
//# sourceMappingURL=deploy-protocol-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-protocol-contract.d.ts","sourceRoot":"","sources":["../src/deploy-protocol-contract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,sBAAsB,CAAC;AAG/E,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAGL,KAAK,qBAAqB,EAC1B,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED,0DAA0D;AAC1D,oBAAY,mBAAmB;IAC7B,uCAAuC;IACvC,WAAW,gBAAgB;IAC3B,qEAAqE;IACrE,OAAO,YAAY;CACpB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAqBlC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,MAAM,KACrB,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,wBAAwB,EAC1C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC,CAsC7B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// The operator deploy flow of the protocol contracts, the signet singleton
|
|
2
|
+
// and the signet responder: builds, balances, proves and submits a
|
|
3
|
+
// contract's deploy transaction using the generic plumbing in ./plumbing.
|
|
4
|
+
// What differs per contract, its compiled assets and private state, arrives
|
|
5
|
+
// as the transaction builder.
|
|
6
|
+
import { getDeployConfig } from "./plumbing/deploy.js";
|
|
7
|
+
import { envOrUndefined } from "./plumbing/env.js";
|
|
8
|
+
import { ensureFeeReady } from "./plumbing/funding.js";
|
|
9
|
+
import { FAUCET_URL_ENV_VAR, getFaucetUrl, MIDNIGHT_NODE_CONFIG_ENV_VARS, } from "./plumbing/midnight-node-config.js";
|
|
10
|
+
import { estimateUnprovenTransactionFee, submitUnprovenTransaction, WalletRegistry, } from "./plumbing/wallet.js";
|
|
11
|
+
/** Where a deploy setting's effective value came from. */
|
|
12
|
+
export var DeploySettingSource;
|
|
13
|
+
(function (DeploySettingSource) {
|
|
14
|
+
/** The environment variable is set. */
|
|
15
|
+
DeploySettingSource["Environment"] = "environment";
|
|
16
|
+
/** The variable is unset or blank, so the built-in value applies. */
|
|
17
|
+
DeploySettingSource["Default"] = "default";
|
|
18
|
+
})(DeploySettingSource || (DeploySettingSource = {}));
|
|
19
|
+
/**
|
|
20
|
+
* Tabulate every environment variable {@link deployProtocolContract} runs
|
|
21
|
+
* with, except the secret `DEPLOYER_SEED`, each with its effective value.
|
|
22
|
+
*
|
|
23
|
+
* @param env - The environment the deploy reads.
|
|
24
|
+
* @param midnightNodeConfig - The node config resolved from `env`.
|
|
25
|
+
* @returns One row per variable, keyed by variable name.
|
|
26
|
+
*/
|
|
27
|
+
export function deployEnvironmentTable(env, midnightNodeConfig) {
|
|
28
|
+
const values = {
|
|
29
|
+
[MIDNIGHT_NODE_CONFIG_ENV_VARS.networkId]: midnightNodeConfig.networkId,
|
|
30
|
+
[MIDNIGHT_NODE_CONFIG_ENV_VARS.nodeUrl]: midnightNodeConfig.nodeUrl,
|
|
31
|
+
[MIDNIGHT_NODE_CONFIG_ENV_VARS.indexerUrl]: midnightNodeConfig.indexerUrl,
|
|
32
|
+
[MIDNIGHT_NODE_CONFIG_ENV_VARS.indexerWsUrl]: midnightNodeConfig.indexerWsUrl,
|
|
33
|
+
[MIDNIGHT_NODE_CONFIG_ENV_VARS.proofServerUrl]: midnightNodeConfig.proofServerUrl,
|
|
34
|
+
[FAUCET_URL_ENV_VAR]: getFaucetUrl(env, midnightNodeConfig.networkId) ?? "(none)",
|
|
35
|
+
};
|
|
36
|
+
return Object.fromEntries(Object.entries(values).map(([name, value]) => [
|
|
37
|
+
name,
|
|
38
|
+
{
|
|
39
|
+
value,
|
|
40
|
+
source: envOrUndefined(env, name) === undefined
|
|
41
|
+
? DeploySettingSource.Default
|
|
42
|
+
: DeploySettingSource.Environment,
|
|
43
|
+
},
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Deploy a protocol contract: read config from `env`, build and prove the deploy
|
|
48
|
+
* transaction and submit it through a synced wallet. Progress is logged to
|
|
49
|
+
* the console, ending with `deployed <name> at <address>`, the line the
|
|
50
|
+
* deploy workflow reads the address from. Any funded wallet can deploy, and
|
|
51
|
+
* nothing about the deployer is sealed. The wallet needs NIGHT only:
|
|
52
|
+
* {@link ensureFeeReady} registers it for dust generation and waits for the
|
|
53
|
+
* deploy transaction's fee in spendable DUST when the wallet holds less.
|
|
54
|
+
*
|
|
55
|
+
* @param name - The contract's package directory name, for the log.
|
|
56
|
+
* @param buildTransaction - Builds the contract's deploy transaction.
|
|
57
|
+
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
58
|
+
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
59
|
+
* @param wallets - A registry to take the deployer wallet from, when the caller
|
|
60
|
+
* keeps wallets open across steps. Without one, a private registry is opened
|
|
61
|
+
* for this deploy and closed after it.
|
|
62
|
+
* @returns The deployed contract address and deploy transaction id.
|
|
63
|
+
* @throws {WalletUnfundedError} If the deployer wallet holds no NIGHT and
|
|
64
|
+
* less DUST than the deploy fee: the error carries the wallet's NIGHT receive address to fund.
|
|
65
|
+
* @throws {Error} If the deploy's fee does not generate in spendable DUST after
|
|
66
|
+
* registering the wallet's NIGHT, or submission fails.
|
|
67
|
+
*/
|
|
68
|
+
export async function deployProtocolContract(name, buildTransaction, env, wallets) {
|
|
69
|
+
const deployConfig = getDeployConfig(env);
|
|
70
|
+
const { networkId } = deployConfig.midnightNodeConfig;
|
|
71
|
+
const registry = wallets ?? new WalletRegistry(deployConfig.midnightNodeConfig);
|
|
72
|
+
console.log(`deploying ${name} to ${networkId} with:`);
|
|
73
|
+
console.table(deployEnvironmentTable(env, deployConfig.midnightNodeConfig));
|
|
74
|
+
try {
|
|
75
|
+
const { facade, keys } = await registry.wallet(deployConfig.deployerSeed, "deployer");
|
|
76
|
+
const deployTransaction = await buildTransaction(networkId, keys.shieldedSecretKeys.coinPublicKey);
|
|
77
|
+
console.log(`contract address (pre-submit): ${deployTransaction.contractAddress}`);
|
|
78
|
+
// The one transaction this deploy submits, priced before anything is sent.
|
|
79
|
+
const fee = await estimateUnprovenTransactionFee(facade, deployTransaction.serializedTransaction);
|
|
80
|
+
console.log(`fee budget: 1 transaction at about ${String(fee)} DUST`);
|
|
81
|
+
const state = await facade.waitForSyncedState();
|
|
82
|
+
await ensureFeeReady(facade, keys, state, networkId, getFaucetUrl(env, networkId), fee);
|
|
83
|
+
const txId = await submitUnprovenTransaction(facade, keys, deployTransaction.serializedTransaction);
|
|
84
|
+
const { contractAddress } = deployTransaction;
|
|
85
|
+
console.log(`submitted deploy tx ${txId}`);
|
|
86
|
+
console.log(`deployed ${name} at ${contractAddress}`);
|
|
87
|
+
return { contractAddress, txId };
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
if (wallets === undefined)
|
|
91
|
+
await registry.close();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=deploy-protocol-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-protocol-contract.js","sourceRoot":"","sources":["../src/deploy-protocol-contract.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,4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M,CAAC,kBAAkB,EAAE,CAAC;QAChD,MAAM,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;QAExF,MAAM,IAAI,GAAG,MAAM,yBAAyB,CAC1C,MAAM,EACN,IAAI,EACJ,iBAAiB,CAAC,qBAAqB,CACxC,CAAC;QACF,MAAM,EAAE,eAAe,EAAE,GAAG,iBAAiB,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,eAAe,EAAE,CAAC,CAAC;QACtD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;IACnC,CAAC;YAAS,CAAC;QACT,IAAI,OAAO,KAAK,SAAS;YAAE,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IACpD,CAAC;AACH,CAAC"}
|
|
@@ -1,43 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import
|
|
3
|
-
/** The outcome of a successful signet-contract deployment. */
|
|
4
|
-
export interface SignetContractDeployment {
|
|
5
|
-
/** Address of the deployed signet contract on Midnight. */
|
|
6
|
-
contractAddress: string;
|
|
7
|
-
/** Identifier of the submitted deploy transaction. */
|
|
8
|
-
txId: TransactionIdentifier;
|
|
9
|
-
}
|
|
10
|
-
/** Where a deploy setting's effective value came from. */
|
|
11
|
-
export declare enum DeploySettingSource {
|
|
12
|
-
/** The environment variable is set. */
|
|
13
|
-
Environment = "environment",
|
|
14
|
-
/** The variable is unset or blank, so the built-in value applies. */
|
|
15
|
-
Default = "default"
|
|
16
|
-
}
|
|
17
|
-
/** One row of {@link deployEnvironmentTable}. */
|
|
18
|
-
export interface DeploySettingRow {
|
|
19
|
-
/** The value the deploy runs with. */
|
|
20
|
-
value: string;
|
|
21
|
-
/** Whether the environment or the built-in default supplied {@link value}. */
|
|
22
|
-
source: DeploySettingSource;
|
|
23
|
-
}
|
|
1
|
+
import { type ContractDeployment } from "./deploy-protocol-contract.ts";
|
|
2
|
+
import type { WalletRegistry } from "./plumbing/wallet.ts";
|
|
24
3
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @param env - The environment the deploy reads.
|
|
29
|
-
* @param midnightNodeConfig - The node config resolved from `env`.
|
|
30
|
-
* @returns One row per variable, keyed by variable name.
|
|
31
|
-
*/
|
|
32
|
-
export declare function deployEnvironmentTable(env: Record<string, string | undefined>, midnightNodeConfig: MidnightNodeConfig): Record<string, DeploySettingRow>;
|
|
33
|
-
/**
|
|
34
|
-
* Deploy the signet contract: read config from `env`, build and prove the
|
|
35
|
-
* deploy transaction and submit it through a synced wallet. Progress is
|
|
36
|
-
* logged to the console. The contract takes no constructor arguments. Any
|
|
37
|
-
* funded wallet can deploy, and nothing about the deployer is sealed. The wallet
|
|
38
|
-
* needs NIGHT only: {@link ensureFeeReady} registers it for dust generation
|
|
39
|
-
* and waits for the deploy transaction's fee in spendable DUST when the
|
|
40
|
-
* wallet holds less.
|
|
4
|
+
* Deploy the signet contract through {@link deployProtocolContract}, which
|
|
5
|
+
* logs `deployed signet-contract at <address>` on success.
|
|
41
6
|
*
|
|
42
7
|
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
43
8
|
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
@@ -50,5 +15,5 @@ export declare function deployEnvironmentTable(env: Record<string, string | unde
|
|
|
50
15
|
* @throws {Error} If the deploy's fee does not generate in spendable DUST after
|
|
51
16
|
* registering the wallet's NIGHT, or submission fails.
|
|
52
17
|
*/
|
|
53
|
-
export declare function deploySignetContract(env?: Record<string, string | undefined>, wallets?: WalletRegistry): Promise<
|
|
18
|
+
export declare function deploySignetContract(env?: Record<string, string | undefined>, wallets?: WalletRegistry): Promise<ContractDeployment>;
|
|
54
19
|
//# sourceMappingURL=deploy-signet-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-signet-contract.d.ts","sourceRoot":"","sources":["../src/deploy-signet-contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy-signet-contract.d.ts","sourceRoot":"","sources":["../src/deploy-signet-contract.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,kBAAkB,EAA0B,MAAM,+BAA+B,CAAC;AAEhG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC,CAa7B"}
|
|
@@ -1,59 +1,15 @@
|
|
|
1
|
-
// Signet-contract deploy flow:
|
|
2
|
-
// contract's
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import { buildDeployTransaction
|
|
9
|
-
import { envOrUndefined } from "./plumbing/env.js";
|
|
10
|
-
import { ensureFeeReady } from "./plumbing/funding.js";
|
|
11
|
-
import { FAUCET_URL_ENV_VAR, getFaucetUrl, MIDNIGHT_NODE_CONFIG_ENV_VARS, } from "./plumbing/midnight-node-config.js";
|
|
12
|
-
import { estimateUnprovenTransactionFee, submitUnprovenTransaction, WalletRegistry, } from "./plumbing/wallet.js";
|
|
1
|
+
// Signet-contract deploy flow: the shared protocol-contract flow over the
|
|
2
|
+
// signet contract's compiled assets. The contract has no constructor
|
|
3
|
+
// arguments (it only emits unauthenticated events: verification is the
|
|
4
|
+
// reader's job) and an empty private state. Requires the contract package's
|
|
5
|
+
// compiled assets to carry keys (its published dist/managed always does; an
|
|
6
|
+
// in-repo checkout needs `yarn compile:zk`).
|
|
7
|
+
import { deployProtocolContract } from "./deploy-protocol-contract.js";
|
|
8
|
+
import { buildDeployTransaction } from "./plumbing/deploy.js";
|
|
13
9
|
import { createSignetContractPrivateState, signetContractCompiledContract, } from "./signet-contract-binding.js";
|
|
14
|
-
/** Where a deploy setting's effective value came from. */
|
|
15
|
-
export var DeploySettingSource;
|
|
16
|
-
(function (DeploySettingSource) {
|
|
17
|
-
/** The environment variable is set. */
|
|
18
|
-
DeploySettingSource["Environment"] = "environment";
|
|
19
|
-
/** The variable is unset or blank, so the built-in value applies. */
|
|
20
|
-
DeploySettingSource["Default"] = "default";
|
|
21
|
-
})(DeploySettingSource || (DeploySettingSource = {}));
|
|
22
10
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @param env - The environment the deploy reads.
|
|
27
|
-
* @param midnightNodeConfig - The node config resolved from `env`.
|
|
28
|
-
* @returns One row per variable, keyed by variable name.
|
|
29
|
-
*/
|
|
30
|
-
export function deployEnvironmentTable(env, midnightNodeConfig) {
|
|
31
|
-
const values = {
|
|
32
|
-
[MIDNIGHT_NODE_CONFIG_ENV_VARS.networkId]: midnightNodeConfig.networkId,
|
|
33
|
-
[MIDNIGHT_NODE_CONFIG_ENV_VARS.nodeUrl]: midnightNodeConfig.nodeUrl,
|
|
34
|
-
[MIDNIGHT_NODE_CONFIG_ENV_VARS.indexerUrl]: midnightNodeConfig.indexerUrl,
|
|
35
|
-
[MIDNIGHT_NODE_CONFIG_ENV_VARS.indexerWsUrl]: midnightNodeConfig.indexerWsUrl,
|
|
36
|
-
[MIDNIGHT_NODE_CONFIG_ENV_VARS.proofServerUrl]: midnightNodeConfig.proofServerUrl,
|
|
37
|
-
[FAUCET_URL_ENV_VAR]: getFaucetUrl(env, midnightNodeConfig.networkId) ?? "(none)",
|
|
38
|
-
};
|
|
39
|
-
return Object.fromEntries(Object.entries(values).map(([name, value]) => [
|
|
40
|
-
name,
|
|
41
|
-
{
|
|
42
|
-
value,
|
|
43
|
-
source: envOrUndefined(env, name) === undefined
|
|
44
|
-
? DeploySettingSource.Default
|
|
45
|
-
: DeploySettingSource.Environment,
|
|
46
|
-
},
|
|
47
|
-
]));
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Deploy the signet contract: read config from `env`, build and prove the
|
|
51
|
-
* deploy transaction and submit it through a synced wallet. Progress is
|
|
52
|
-
* logged to the console. The contract takes no constructor arguments. Any
|
|
53
|
-
* funded wallet can deploy, and nothing about the deployer is sealed. The wallet
|
|
54
|
-
* needs NIGHT only: {@link ensureFeeReady} registers it for dust generation
|
|
55
|
-
* and waits for the deploy transaction's fee in spendable DUST when the
|
|
56
|
-
* wallet holds less.
|
|
11
|
+
* Deploy the signet contract through {@link deployProtocolContract}, which
|
|
12
|
+
* logs `deployed signet-contract at <address>` on success.
|
|
57
13
|
*
|
|
58
14
|
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
59
15
|
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
@@ -67,29 +23,6 @@ export function deployEnvironmentTable(env, midnightNodeConfig) {
|
|
|
67
23
|
* registering the wallet's NIGHT, or submission fails.
|
|
68
24
|
*/
|
|
69
25
|
export async function deploySignetContract(env = process.env, wallets) {
|
|
70
|
-
|
|
71
|
-
const { networkId } = deployConfig.midnightNodeConfig;
|
|
72
|
-
const registry = wallets ?? new WalletRegistry(deployConfig.midnightNodeConfig);
|
|
73
|
-
console.log(`deploying signet-contract to ${networkId} with:`);
|
|
74
|
-
console.table(deployEnvironmentTable(env, deployConfig.midnightNodeConfig));
|
|
75
|
-
try {
|
|
76
|
-
const { facade, keys } = await registry.wallet(deployConfig.deployerSeed, "deployer");
|
|
77
|
-
const deployTransaction = await buildDeployTransaction(signetContractCompiledContract, networkId, keys.shieldedSecretKeys.coinPublicKey, createSignetContractPrivateState());
|
|
78
|
-
console.log(`contract address (pre-submit): ${deployTransaction.contractAddress}`);
|
|
79
|
-
// The one transaction this deploy submits, priced before anything is sent.
|
|
80
|
-
const fee = await estimateUnprovenTransactionFee(facade, deployTransaction.serializedTransaction);
|
|
81
|
-
console.log(`fee budget: 1 transaction at about ${String(fee)} DUST`);
|
|
82
|
-
const state = await facade.waitForSyncedState();
|
|
83
|
-
await ensureFeeReady(facade, keys, state, networkId, getFaucetUrl(env, networkId), fee);
|
|
84
|
-
const txId = await submitUnprovenTransaction(facade, keys, deployTransaction.serializedTransaction);
|
|
85
|
-
const { contractAddress } = deployTransaction;
|
|
86
|
-
console.log(`submitted deploy tx ${txId}`);
|
|
87
|
-
console.log(`deployed signet-contract at ${contractAddress}`);
|
|
88
|
-
return { contractAddress, txId };
|
|
89
|
-
}
|
|
90
|
-
finally {
|
|
91
|
-
if (wallets === undefined)
|
|
92
|
-
await registry.close();
|
|
93
|
-
}
|
|
26
|
+
return deployProtocolContract("signet-contract", (networkId, coinPublicKeyHex) => buildDeployTransaction(signetContractCompiledContract, networkId, coinPublicKeyHex, createSignetContractPrivateState()), env, wallets);
|
|
94
27
|
}
|
|
95
28
|
//# sourceMappingURL=deploy-signet-contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-signet-contract.js","sourceRoot":"","sources":["../src/deploy-signet-contract.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"deploy-signet-contract.js","sourceRoot":"","sources":["../src/deploy-signet-contract.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,uEAAuE;AACvE,4EAA4E;AAC5E,4EAA4E;AAC5E,6CAA6C;AAE7C,OAAO,EAA2B,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EACL,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,GAAG,GAAuC,OAAO,CAAC,GAAG,EACrD,OAAwB;IAExB,OAAO,sBAAsB,CAC3B,iBAAiB,EACjB,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,CAC9B,sBAAsB,CACpB,8BAA8B,EAC9B,SAAS,EACT,gBAAgB,EAChB,gCAAgC,EAAE,CACnC,EACH,GAAG,EACH,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ContractDeployment } from "./deploy-protocol-contract.ts";
|
|
2
|
+
import type { WalletRegistry } from "./plumbing/wallet.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Deploy the signet responder through {@link deployProtocolContract}, which
|
|
5
|
+
* logs `deployed signet-responder at <address>` on success.
|
|
6
|
+
*
|
|
7
|
+
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
8
|
+
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
9
|
+
* @param wallets - A registry to take the deployer wallet from, when the caller
|
|
10
|
+
* keeps wallets open across steps. Without one, a private registry is opened
|
|
11
|
+
* for this deploy and closed after it.
|
|
12
|
+
* @returns The deployed contract address and deploy transaction id.
|
|
13
|
+
* @throws {WalletUnfundedError} If the deployer wallet holds no NIGHT and
|
|
14
|
+
* less DUST than the deploy fee: the error carries the wallet's NIGHT receive address to fund.
|
|
15
|
+
* @throws {Error} If the deploy's fee does not generate in spendable DUST after
|
|
16
|
+
* registering the wallet's NIGHT, or submission fails.
|
|
17
|
+
*/
|
|
18
|
+
export declare function deploySignetResponder(env?: Record<string, string | undefined>, wallets?: WalletRegistry): Promise<ContractDeployment>;
|
|
19
|
+
//# sourceMappingURL=deploy-signet-responder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-signet-responder.d.ts","sourceRoot":"","sources":["../src/deploy-signet-responder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAA0B,MAAM,+BAA+B,CAAC;AAEhG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC,CAa7B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Signet-responder deploy flow: the shared protocol-contract flow over the
|
|
2
|
+
// responder's compiled assets. Like the singleton, the responder has no
|
|
3
|
+
// constructor arguments and an empty private state. Requires its compiled
|
|
4
|
+
// assets to carry keys (its published dist/managed always does; an in-repo
|
|
5
|
+
// checkout needs `yarn compile:signet-responder:zk`).
|
|
6
|
+
import { deployProtocolContract } from "./deploy-protocol-contract.js";
|
|
7
|
+
import { buildDeployTransaction } from "./plumbing/deploy.js";
|
|
8
|
+
import { createSignetResponderPrivateState, signetResponderCompiledContract, } from "./signet-responder-binding.js";
|
|
9
|
+
/**
|
|
10
|
+
* Deploy the signet responder through {@link deployProtocolContract}, which
|
|
11
|
+
* logs `deployed signet-responder at <address>` on success.
|
|
12
|
+
*
|
|
13
|
+
* @param env - Environment map providing `DEPLOYER_SEED` and the shared
|
|
14
|
+
* Midnight node configuration (see `getMidnightNodeConfig`).
|
|
15
|
+
* @param wallets - A registry to take the deployer wallet from, when the caller
|
|
16
|
+
* keeps wallets open across steps. Without one, a private registry is opened
|
|
17
|
+
* for this deploy and closed after it.
|
|
18
|
+
* @returns The deployed contract address and deploy transaction id.
|
|
19
|
+
* @throws {WalletUnfundedError} If the deployer wallet holds no NIGHT and
|
|
20
|
+
* less DUST than the deploy fee: the error carries the wallet's NIGHT receive address to fund.
|
|
21
|
+
* @throws {Error} If the deploy's fee does not generate in spendable DUST after
|
|
22
|
+
* registering the wallet's NIGHT, or submission fails.
|
|
23
|
+
*/
|
|
24
|
+
export async function deploySignetResponder(env = process.env, wallets) {
|
|
25
|
+
return deployProtocolContract("signet-responder", (networkId, coinPublicKeyHex) => buildDeployTransaction(signetResponderCompiledContract, networkId, coinPublicKeyHex, createSignetResponderPrivateState()), env, wallets);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=deploy-signet-responder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-signet-responder.js","sourceRoot":"","sources":["../src/deploy-signet-responder.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,sDAAsD;AAEtD,OAAO,EAA2B,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EACL,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAG,GAAuC,OAAO,CAAC,GAAG,EACrD,OAAwB;IAExB,OAAO,sBAAsB,CAC3B,kBAAkB,EAClB,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,CAC9B,sBAAsB,CACpB,+BAA+B,EAC/B,SAAS,EACT,gBAAgB,EAChB,iCAAiC,EAAE,CACpC,EACH,GAAG,EACH,OAAO,CACR,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from "./deploy-protocol-contract.ts";
|
|
1
2
|
export * from "./deploy-signet-contract.ts";
|
|
3
|
+
export * from "./deploy-signet-responder.ts";
|
|
2
4
|
export * from "./plumbing/counterparties.ts";
|
|
3
5
|
export * from "./plumbing/deploy.ts";
|
|
4
6
|
export * from "./plumbing/env.ts";
|
|
@@ -9,4 +11,5 @@ export * from "./plumbing/network-id.ts";
|
|
|
9
11
|
export * from "./plumbing/seed.ts";
|
|
10
12
|
export * from "./plumbing/wallet.ts";
|
|
11
13
|
export * from "./signet-contract-binding.ts";
|
|
14
|
+
export * from "./signet-responder-binding.ts";
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
// Deploy tooling for the
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
1
|
+
// Deploy tooling for the signet contracts, self-contained for npm: the
|
|
2
|
+
// operator deploy flows of the signet singleton and the signet responder,
|
|
3
|
+
// the Node bindings of @sig-net/midnight-contract and
|
|
4
|
+
// @sig-net/midnight-responder to their compiled assets, and the generic
|
|
5
|
+
// Midnight deploy/wallet plumbing (config, seed parsing, key derivation,
|
|
6
|
+
// wallet facade, unproven-tx build/submit) the flows are built from. The
|
|
7
|
+
// plumbing is generic on purpose — any contract package's deploy script
|
|
8
|
+
// composes it.
|
|
9
|
+
export * from "./deploy-protocol-contract.js";
|
|
7
10
|
export * from "./deploy-signet-contract.js";
|
|
11
|
+
export * from "./deploy-signet-responder.js";
|
|
8
12
|
export * from "./plumbing/counterparties.js";
|
|
9
13
|
export * from "./plumbing/deploy.js";
|
|
10
14
|
export * from "./plumbing/env.js";
|
|
@@ -15,4 +19,5 @@ export * from "./plumbing/network-id.js";
|
|
|
15
19
|
export * from "./plumbing/seed.js";
|
|
16
20
|
export * from "./plumbing/wallet.js";
|
|
17
21
|
export * from "./signet-contract-binding.js";
|
|
22
|
+
export * from "./signet-responder-binding.js";
|
|
18
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,0EAA0E;AAC1E,sDAAsD;AACtD,wEAAwE;AACxE,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,eAAe;AAEf,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/plumbing/wallet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/plumbing/wallet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAWnD,OAAO,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AE,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,EAC5D,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,CAAC,CAAC,CASZ;AA6DD,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;GAOG;AACH,qBAAa,cAAc;IAQvB,QAAQ,CAAC,MAAM,EAAE,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgD;IAExE;;;OAGG;IACH,YACW,MAAM,EAAE,kBAAkB,EAClB,OAAO,GAAE,mBAAwB,EAChD;IAEJ;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAU7D;YAEa,IAAI;IAalB;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAS3B;CACF"}
|
package/dist/plumbing/wallet.js
CHANGED
|
@@ -139,24 +139,11 @@ export function initialiseWalletFacade(keys, config, options = {}) {
|
|
|
139
139
|
},
|
|
140
140
|
txHistoryStorage: new InMemoryTransactionHistoryStorage(WalletEntrySchema, mergeWalletEntries),
|
|
141
141
|
},
|
|
142
|
-
shielded: (cfg) => ShieldedWallet(
|
|
142
|
+
shielded: (cfg) => ShieldedWallet(cfg).startWithSecretKeys(keys.shieldedSecretKeys),
|
|
143
143
|
unshielded: (cfg) => UnshieldedWallet(cfg).startWithPublicKey(UnshieldedPublicKey.fromKeyStore(keys.unshieldedKeystore)),
|
|
144
|
-
dust: (cfg) =>
|
|
145
|
-
// DustWallet's declared configuration omits the sync fields its default sync reads.
|
|
146
|
-
const dustConfiguration = {
|
|
147
|
-
...cfg,
|
|
148
|
-
batchUpdates: { size: SYNC_BATCH_SIZE },
|
|
149
|
-
};
|
|
150
|
-
return DustWallet(dustConfiguration).startWithSecretKey(keys.dustSecretKey, ledger.LedgerParameters.initialParameters().dust);
|
|
151
|
-
},
|
|
144
|
+
dust: (cfg) => DustWallet(cfg).startWithSecretKey(keys.dustSecretKey, ledger.LedgerParameters.initialParameters().dust),
|
|
152
145
|
});
|
|
153
146
|
}
|
|
154
|
-
/**
|
|
155
|
-
* Indexer events the shielded and DUST wallets apply per batch. The SDK's
|
|
156
|
-
* default of 10 is dominated by per-batch overhead: a full Stagenet DUST sync
|
|
157
|
-
* took 209 s at 10, 80 s at 100 and 72 s at 1000, where one core is saturated.
|
|
158
|
-
*/
|
|
159
|
-
const SYNC_BATCH_SIZE = 1000;
|
|
160
147
|
// Recipes (balancing plans for submitted transactions) expire 30 min out.
|
|
161
148
|
const RECIPE_TTL_MS = 30 * 60 * 1000;
|
|
162
149
|
// Dust generates continuously once NIGHT is registered, but a fresh
|
|
@@ -419,8 +406,8 @@ async function waitForSyncedStateLogging(facade, label, config) {
|
|
|
419
406
|
const heartbeat = setInterval(() => {
|
|
420
407
|
const position = latest === undefined
|
|
421
408
|
? "no state yet"
|
|
422
|
-
: `shielded ${syncPosition(latest.shielded.progress.appliedIndex, latest.shielded.progress.
|
|
423
|
-
`dust ${syncPosition(latest.dust.progress.appliedIndex, latest.dust.progress.
|
|
409
|
+
: `shielded ${syncPosition(latest.shielded.progress.appliedIndex, latest.shielded.progress.highestIndex)}, ` +
|
|
410
|
+
`dust ${syncPosition(latest.dust.progress.appliedIndex, latest.dust.progress.highestIndex)}, ` +
|
|
424
411
|
`unshielded ${syncPosition(latest.unshielded.progress.appliedId, latest.unshielded.progress.highestTransactionId)}`;
|
|
425
412
|
console.log(` ${label} wallet still syncing after ${elapsed()}: ${position}`);
|
|
426
413
|
}, SYNC_HEARTBEAT_MS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../src/plumbing/wallet.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,2EAA2E;AAC3E,oEAAoE;AACpE,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAiC,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAElG,OAAO,EAEL,kBAAkB,EAElB,iBAAiB,EACjB,YAAY,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EACL,cAAc,EACd,SAAS,IAAI,mBAAmB,EAEhC,gBAAgB,GACjB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,wBAAwB,EAAkB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA4BtC,uDAAuD;AACvD,8EAA8E;AAC9E,0EAA0E;AAC1E,0EAA0E;AAC1E,8EAA8E;AAC9E,kEAAkE;AAClE,6EAA6E;AAC7E,uEAAuE;AACvE,6EAA6E;AAC7E,4EAA4E;AAC5E,mDAAmD;AACnD,oCAAoC;AACpC,MAAM,kCAAkC,GAAG,eAAmB,CAAC;AAC/D,MAAM,gCAAgC,GAAG,EAAE,CAAC;AA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AAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC3C,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK;QACT,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC3B,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACpD,MAAM,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Contract, createSignetResponderPrivateState, type SignetResponderPrivateState } from "@sig-net/midnight-responder";
|
|
2
|
+
/** Absolute path of the signet responder's `managed/` zk config root. */
|
|
3
|
+
export declare const signetResponderManagedPath: string;
|
|
4
|
+
/**
|
|
5
|
+
* The signet-responder compact-js compiled-contract binding: generated module
|
|
6
|
+
* (the contract declares no witnesses) and the compiled assets on disk.
|
|
7
|
+
* Consumed by deploy tooling.
|
|
8
|
+
*/
|
|
9
|
+
export declare const signetResponderCompiledContract: import("@midnight-ntwrk/compact-js/effect/CompiledContract").CompiledContract<Contract<SignetResponderPrivateState, import("@sig-net/midnight-responder").Witnesses<SignetResponderPrivateState>>, SignetResponderPrivateState, never>;
|
|
10
|
+
export { createSignetResponderPrivateState };
|
|
11
|
+
//# sourceMappingURL=signet-responder-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signet-responder-binding.d.ts","sourceRoot":"","sources":["../src/signet-responder-binding.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EACR,iCAAiC,EACjC,KAAK,2BAA2B,EACjC,MAAM,6BAA6B,CAAC;AASrC,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,wOAGe,CAAC;AAI5D,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// The NODE binding of the signet responder to its compiled assets: the
|
|
2
|
+
// environment-specific half @sig-net/midnight-responder does not ship, the
|
|
3
|
+
// responder's counterpart of signet-contract-binding.ts.
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { Contract, createSignetResponderPrivateState, } from "@sig-net/midnight-responder";
|
|
7
|
+
import { makeVacantCompiledContract } from "./plumbing/deploy.js";
|
|
8
|
+
// Resolved through the package specifier, as signetContractManagedPath is:
|
|
9
|
+
// the managed/ dir sits beside the entry module both in the repo
|
|
10
|
+
// (src/index.ts + src/managed, keys from `yarn compile:signet-responder:zk`)
|
|
11
|
+
// and in the npm tarball (dist/index.js + dist/managed, which always carries
|
|
12
|
+
// the keys).
|
|
13
|
+
/** Absolute path of the signet responder's `managed/` zk config root. */
|
|
14
|
+
export const signetResponderManagedPath = join(dirname(createRequire(import.meta.url).resolve("@sig-net/midnight-responder")), "managed");
|
|
15
|
+
/**
|
|
16
|
+
* The signet-responder compact-js compiled-contract binding: generated module
|
|
17
|
+
* (the contract declares no witnesses) and the compiled assets on disk.
|
|
18
|
+
* Consumed by deploy tooling.
|
|
19
|
+
*/
|
|
20
|
+
export const signetResponderCompiledContract = makeVacantCompiledContract("signet-responder", Contract, signetResponderManagedPath);
|
|
21
|
+
// Re-exported so deploy-side callers get the private state builder from the
|
|
22
|
+
// same module as the binding it pairs with.
|
|
23
|
+
export { createSignetResponderPrivateState };
|
|
24
|
+
//# sourceMappingURL=signet-responder-binding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signet-responder-binding.js","sourceRoot":"","sources":["../src/signet-responder-binding.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,2EAA2E;AAC3E,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,QAAQ,EACR,iCAAiC,GAElC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,2EAA2E;AAC3E,iEAAiE;AACjE,6EAA6E;AAC7E,6EAA6E;AAC7E,aAAa;AACb,yEAAyE;AACzE,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAC5C,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC,EAC9E,SAAS,CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,0BAA0B,CAGvE,kBAAkB,EAAE,QAAQ,EAAE,0BAA0B,CAAC,CAAC;AAE5D,4EAA4E;AAC5E,4CAA4C;AAC5C,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sig-net/midnight-contract-deploy",
|
|
3
|
-
"version": "0.26.0-rc.
|
|
3
|
+
"version": "0.26.0-rc.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sig-net/midnight-integration",
|
|
7
7
|
"directory": "packages/signet-contract-deploy"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"description": "Deploy tooling for the
|
|
10
|
+
"description": "Deploy tooling for the signet contracts on Midnight: the operator deploy flows of the central signet contract and the signet responder, the Node bindings of @sig-net/midnight-contract and @sig-net/midnight-responder to their compiled assets, and the generic deploy/wallet plumbing (node config, seed parsing, key derivation, wallet facade, unproven-tx build/submit) any Compact contract's deploy script composes.",
|
|
11
11
|
"//exports": "Local dev consumes raw TS source. `publishConfig.exports` below swaps this to the emitted ./dist at publish time, so npm consumers get JS + .d.ts while the monorepo keeps resolving to src.",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"build": "rm -rf dist && tsc -p tsconfig.json && tsc -p tsconfig.build.json",
|
|
23
23
|
"prepack": "yarn build",
|
|
24
24
|
"test": "vitest run",
|
|
25
|
-
"deploy": "tsx --env-file-if-exists=../../.env deploy.ts"
|
|
25
|
+
"deploy": "tsx --env-file-if-exists=../../.env deploy.ts",
|
|
26
|
+
"deploy:signet-responder": "tsx --env-file-if-exists=../../.env deploy-signet-responder.ts"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public",
|
|
@@ -50,8 +51,9 @@
|
|
|
50
51
|
"@midnightntwrk/wallet-sdk-shielded": "4.0.0-beta.2",
|
|
51
52
|
"@midnightntwrk/wallet-sdk-unshielded-wallet": "4.0.0-beta.2",
|
|
52
53
|
"@scure/bip39": "^2.2.0",
|
|
53
|
-
"@sig-net/midnight": "^0.26.0-rc.
|
|
54
|
-
"@sig-net/midnight-contract": "^0.26.0-rc.
|
|
54
|
+
"@sig-net/midnight": "^0.26.0-rc.2",
|
|
55
|
+
"@sig-net/midnight-contract": "^0.26.0-rc.2",
|
|
56
|
+
"@sig-net/midnight-responder": "^0.26.0-rc.2",
|
|
55
57
|
"effect": "^3.22.2"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|