Skip to content

Commit

Permalink
Rename src/raw... to src/sk...
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Nov 24, 2023
1 parent 4ebf3ff commit 337a38a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 15 deletions.
18 changes: 15 additions & 3 deletions dapp/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# Spore Typed Message

## Create and transfer Spore on test network by default secp256k1 lock

```shell
$ npm install

$ npm run indexCreateSpore
# Replace TxHash in src/indexTransferSpore.ts
$ npm run indexTransferSpore
$ npm run skCreateSpore
# Replace TxHash in src/skTransferSpore.ts
$ npm run skTransferSpore
```

## Create and transfer Spore on dev network by typed message

**Not yet testable!**

```shell
$ npm run tmCreateSpore
# Replace TxHash in src/tmTransferSpore.ts
$ npm run tmTransferSpore
```
10 changes: 5 additions & 5 deletions dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "0.1.0",
"license": "MIT",
"scripts": {
"rawCreateImmortalSpore": "ts-node src/rawCreateImmortalSpore.ts",
"rawCreatePrivateCluster": "ts-node src/rawCreatePrivateCluster.ts",
"rawCreateSpore": "ts-node src/rawCreateSpore.ts",
"rawCreateSporeWithCluster": "ts-node src/rawCreateSporeWithCluster.ts",
"rawTransferSpore": "ts-node src/rawTransferSpore.ts",
"skCreateImmortalSpore": "ts-node src/skCreateImmortalSpore.ts",
"skCreatePrivateCluster": "ts-node src/skCreatePrivateCluster.ts",
"skCreateSpore": "ts-node src/skCreateSpore.ts",
"skCreateSporeWithCluster": "ts-node src/skCreateSporeWithCluster.ts",
"skTransferSpore": "ts-node src/skTransferSpore.ts",
"tmCreateSpore": "ts-node src/tmCreateSpore.ts",
"tmTransferSpore": "ts-node src/tmTransferSpore.ts"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSpore } from '@spore-sdk/core';
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { accounts } from './rawWallet';
import { accounts } from './skWallet';

export async function fetchLocalFile(src: string) {
const buffer = readFileSync(resolve(__dirname, src));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createCluster } from '@spore-sdk/core';
import { accounts } from './rawWallet';
import { accounts } from './skWallet';

export async function main() {
let { txSkeleton, outputIndex } = await createCluster({
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/rawCreateSpore.ts → dapp/src/skCreateSpore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSpore } from '@spore-sdk/core';
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { accounts } from './rawWallet';
import { accounts } from './skWallet';

export async function fetchLocalFile(src: string) {
const buffer = readFileSync(resolve(__dirname, src));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSpore } from '@spore-sdk/core';
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { accounts } from './rawWallet';
import { accounts } from './skWallet';

export async function fetchLocalFile(src: string) {
const buffer = readFileSync(resolve(__dirname, src));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { transferSpore } from '@spore-sdk/core';
import { accounts } from './rawWallet';
import { accounts } from './skWallet';

async function main() {
let { txSkeleton } = await transferSpore({
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions dapp/src/tmConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createConfig } from '@ckb-lumos/config-manager';
import { HashType } from '@ckb-lumos/base';
import { SporeConfig, PredefinedSporeConfigScriptName } from '@spore-sdk/core';

// export const config: SporeConfig<PredefinedSporeConfigScriptName> = {
Expand Down Expand Up @@ -156,7 +157,7 @@ export const config: SporeConfig<PredefinedSporeConfigScriptName> = {
export const configAuth = {
script: {
codeHash: '0x9017dadb5493e6317da3bab8a1456851d45043ff701d6455a03abdabcad99e3e',
hashType: 'data1',
hashType: 'data1' as HashType,
},
cellDep: {
outPoint: {
Expand All @@ -170,7 +171,7 @@ export const configAuth = {
export const configTypedMessageLockDemo = {
script: {
codeHash: '0xcf37fcee5e82ead0393c3aad78a7560a6f242fcc7d64aa2e6324de875ef1f2d5',
hashType: 'data1',
hashType: 'data1' as HashType,
},
cellDep: {
outPoint: {
Expand Down

0 comments on commit 337a38a

Please sign in to comment.