@fadroma/scrt
TypeScript icon, indicating that this package has built-in type declarations

11.0.0-rc.30 • Public • Published

Fadroma Agent for Secret Network

This package lets you use Fadroma Agent on Secret Network using the SecretJS client library.

See https://fadroma.tech for more info.


Quick start

import * as Scrt from '@fadroma/scrt'

// connect to mainnet:
const scrt = Scrt.mainnet()
const scrt = Scrt.mainnet({ url })
const scrt = Scrt.mainnet({ identity: { mnemonic } })
const scrt = Scrt.mainnet({ identity: { encryptionUtils } })

// connect to testnet:
const scrt = Scrt.testnet(/* same as above */)

// connect to custom endpoint:
const scrt = new Scrt.Connection({ chainId, url, identity })

// upload code:
const uploaded = await scrt.upload('./path/to.wasm')
const uploaded = await scrt.upload('file:///path/to.wasm')
const uploaded = await scrt.upload('https:///path/to.wasm')
const uploaded = await scrt.upload(new Uint8Array([/*raw waasm*/]))

// instantiate code:
const contract = await scrt.instantiate(codeId, { label, initMsg })
const contract = await scrt.instantiate(uploaded, { label, initMsg })
const contract = await scrt.instantiate({ codeId }, { label, initMsg })

// obtain handle to existing contract:
const contract = scrt.getContract('address')
const contract = scrt.getContract({ address })

// call contract methods:
const response = await contract.query(message)
const resultTx = await contract.execute(message)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
11.0.0-rc.305latest

Version History

VersionDownloads (Last 7 Days)Published
11.0.0-rc.305
11.0.0-rc.291
11.0.0-rc.281
11.0.0-rc.271
11.0.0-rc.261
11.0.0-rc.251
11.0.0-rc.240
11.0.0-rc.231
11.0.0-rc.220
11.0.0-rc.210
11.0.0-rc.200
11.0.0-rc.190
11.0.0-rc.180
11.0.0-rc.170
11.0.0-rc.160
11.0.0-rc.150
11.0.0-rc.141
11.0.0-rc.131
11.0.0-rc.121
11.0.0-rc.110
11.0.0-rc.100
11.0.0-rc.91
11.0.0-rc.80
11.0.0-rc.71
11.0.0-rc.61
11.0.0-rc.50
11.0.0-rc.40
11.0.0-rc.30
11.0.0-rc.20
11.0.0-rc.10
10.1.10-rc.130
10.1.10-rc.120
10.1.10-rc.100
10.1.10-rc.90
10.1.10-rc.80
10.1.10-rc.70
10.1.10-rc.61
10.1.10-rc.50
10.1.10-rc.40
10.1.10-rc.30
10.1.10-rc.20
10.1.10-rc.11
10.1.82
10.1.71
10.1.61
10.1.52
10.1.46
10.1.32
10.1.21
10.1.12
10.1.02
10.0.21
10.0.11
10.0.01
9.0.01
9.0.0-rc.230
9.0.0-rc.221
9.0.0-rc.210
9.0.0-rc.201
9.0.0-rc.191
9.0.0-rc.180
9.0.0-rc.170
9.0.0-rc.160
9.0.0-rc.150
9.0.0-rc.141
9.0.0-rc.130
9.0.0-rc.120
9.0.0-rc.110
9.0.0-rc.100
9.0.0-rc.90
9.0.0-rc.80
9.0.0-rc.60
9.0.0-rc.50
9.0.0-rc.40
9.0.0-rc.34
9.0.0-rc.21
9.0.0-rc.10
9.0.0-rc.01
8.0.41
8.0.31
8.0.22
8.0.12
8.0.01
7.0.71
7.0.62
7.0.52
7.0.41
7.0.31
7.0.21
7.0.11
7.0.01
6.0.11
6.0.01
5.0.13
5.0.02
4.1.22
4.1.11
4.1.02
4.0.12
4.0.02
3.3.01
3.2.22
3.1.41
3.1.31
3.2.12
3.2.02
3.1.21
3.1.11
3.1.01
3.0.82
3.0.71
3.0.51
3.0.42
3.0.32
3.0.23
3.0.11
3.0.01
2.0.01
1.3.02
1.2.01
1.1.01
1.0.62
1.0.52
1.0.41
1.0.31
1.0.22
1.0.12
1.0.01

Package Sidebar

Install

npm i @fadroma/scrt

Weekly Downloads

12

Version

11.0.0-rc.30

License

AGPL-3.0-only

Unpacked Size

290 kB

Total Files

73

Last publish

Collaborators

  • atanas-krondev
  • exactlywhoyouthinkitis